159 lines
11 KiB
HTML
159 lines
11 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="reference" />
|
|
<meta name="DC.Title" content="Start Database Monitor (STRDBMON) command" />
|
|
<meta name="abstract" content="The Start Database Monitor (STRDBMON) command starts the collection of database performance statistics for a specified job, for all jobs on the system or for a selected set of jobs. The statistics are placed in a user-specified database table and member. If the table or member do not exist, one is created based on the QAQQDBMN table in library QSYS. If the table and member do exist, the record format of the specified table is verified to insure it is the same." />
|
|
<meta name="description" content="The Start Database Monitor (STRDBMON) command starts the collection of database performance statistics for a specified job, for all jobs on the system or for a selected set of jobs. The statistics are placed in a user-specified database table and member. If the table or member do not exist, one is created based on the QAQQDBMN table in library QSYS. If the table and member do exist, the record format of the specified table is verified to insure it is the same." />
|
|
<meta name="DC.subject" content="command, Start Database Monitor (STRDBMON), STRDBMON (Start Database Monitor), commands, database monitor, start" />
|
|
<meta name="keywords" content="command, Start Database Monitor (STRDBMON), STRDBMON (Start Database Monitor), commands, database monitor, start" />
|
|
<meta name="DC.Relation" scheme="URI" content="dms.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../cl/strdbmon.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="strdbmon" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Start Database Monitor (STRDBMON) command</title>
|
|
</head>
|
|
<body id="strdbmon"><a name="strdbmon"><!-- --></a>
|
|
<img src="./delta.gif" alt="Start of change" /><!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1"><span class="cmdname">Start Database Monitor (STRDBMON)</span> command</h1>
|
|
<div><p>The <span class="cmdname">Start Database Monitor (STRDBMON)</span> command
|
|
starts the collection of database performance statistics for a specified
|
|
job, for all jobs on the system or for a selected set of jobs. The statistics
|
|
are placed in a user-specified database table and member. If the table or
|
|
member do not exist, one is created based on the QAQQDBMN table in library
|
|
QSYS. If the table and member do exist, the record format of the specified
|
|
table is verified to insure it is the same.</p>
|
|
<div class="section"><p>For each monitor started using the STRDBMON command, the system
|
|
generates a monitor ID that can be used to uniquely identify each individual
|
|
monitor. The monitor ID can be used on the ENDDBMON command to uniquely identify
|
|
which monitor is to be ended. The monitor ID is returned in the informational
|
|
message CPI436A which is generated for each occurrence of the STRDBMON command.
|
|
The monitor ID can also be found in column QQC101 of the QQQ3018 database
|
|
monitor record. </p>
|
|
</div>
|
|
<div class="section"><p>Informally there are two types of monitors. A private monitor
|
|
is a monitor over one, specific job (or the current job). Only one (1) monitor
|
|
can be started on a specific job at a time. For example, STRDBMON JOB(*)
|
|
followed by another STRDBMON JOB(*) within the same job is not allowed. A
|
|
public monitor is a monitor which collects data across multiple jobs. There
|
|
can be a maximum of ten (10) public monitors active at any one time. For example,
|
|
STRDBMON JOB(*ALL) followed by another STRDBMON JOB(*ALL) is allowed providing
|
|
the maximum number of public monitors does not exceed 10. You may have 10
|
|
public monitors and 1 private monitor active at the same time for any specific
|
|
job.</p>
|
|
</div>
|
|
<div class="section"><p>If multiple monitors specify the same output file, only one copy
|
|
of the database statistic records will be written to the specified output
|
|
file for each job. For example, STRDBMON OUTFILE(LIB/TABLE1) JOB(*) and STRDBMON
|
|
OUTFILE(LIB/TABLE1) JOB(*ALL) target the same output file. For the current
|
|
job, you will not get two copies of the database statistic records, one copy
|
|
for the private monitor and one copy for the public monitor. You will get
|
|
only one copy of the database statistic records.</p>
|
|
</div>
|
|
<div class="section"><p>If the monitor is started on all jobs (a public monitor), any
|
|
jobs waiting on job queues or any jobs started during the monitoring period
|
|
are included in the monitor data. If the monitor is started on a specific
|
|
job (a private monitor) that job must be active in the server when the command
|
|
is issued. Each job in the server can be monitored concurrently by one private
|
|
monitor and a maximum of 10 public monitors.</p>
|
|
</div>
|
|
<div class="section"><p>The STRDBMON command allows you to collect statistic records for
|
|
a specific set or subset of the queries running on any job. This filtering
|
|
can be performed over the job name, the user profile, the name of the table(s)
|
|
being queried, the estimated run time of the query, the TCP/IP internet address,
|
|
or any combination of those filters. Specifying a STRDBMON filter should
|
|
help minimize the number of statistic records captured for any monitor.</p>
|
|
</div>
|
|
<div class="example"><h4 class="sectiontitle">Example 1: Starting Database Monitoring For All Jobs</h4><pre>STRDBMON OUTFILE(QGPL/FILE1) OUTMBR(MEMBER1 *ADD) JOB(*ALL)
|
|
FRCRCD(10)</pre>
|
|
<p>This command starts database monitoring for all jobs
|
|
on the system. The performance statistics are added to the member named MEMBER1
|
|
in the file named FILE1 in the QGPL library. Ten records will be held before
|
|
being written to the file.</p>
|
|
</div>
|
|
<div class="example"><h4 class="sectiontitle">Example 2: Starting Database Monitoring For a Specific Job</h4><pre>STRDBMON OUTFILE(*LIBL/FILE3) OUTMBR(MEMBER2) JOB(134543/QPGMR/DSP01)
|
|
FRCRCD(20)</pre>
|
|
<p>This command starts database monitoring for job number
|
|
134543. The job name is DSP01 and was started by the user named QPGMR. The
|
|
performance statistics are added to the member named MEMBER2 in the file named
|
|
FILE3. Twenty records will be held before being written to the file.</p>
|
|
</div>
|
|
<div class="example"><h4 class="sectiontitle">Example 3: Starting Database Monitoring For a Specific Job
|
|
to a File in a Library in an Independent ASP</h4><pre>STRDBMON OUTFILE(LIB41/DBMONFILE) JOB(134543/QPGMR/DSP01)</pre>
|
|
<p>This
|
|
command starts database monitoring for job number 134543. The job name is
|
|
DSP01 and was started by the user named QPGMR. The performance statistics
|
|
are added to the member name DBMONFILE (since OUTMBR was not specified) in
|
|
the file named DBMONFILE in the library named LIB41. This library may exist
|
|
in more than one independent auxiliary storage pool (ASP); the library in
|
|
the name space of the originator's job will always be used.</p>
|
|
</div>
|
|
<div class="example"><h4 class="sectiontitle">Example 4: Starting Database Monitoring For All Jobs That
|
|
Begin With 'QZDA'</h4><pre> STRDBMON OUTFILE(LIB41/DBMONFILE) JOB(*ALL/*ALL/QZDA*)</pre>
|
|
<p>This
|
|
command starts database monitoring for all jobs whose job name begins with
|
|
'QZDA'. The performance statistics (monitor records) are added to member
|
|
DBMONFILE (since OUTMBR was not specified) in file DBMONFILE in library LIB41.
|
|
This library may exist in more than one independent auxiliary storage pool
|
|
(ASP); the library in the name space of the originator's job will always be
|
|
used. Note that because this is a public type monitor, so any QZDA jobs that
|
|
are started will also have statistics records collected.</p>
|
|
</div>
|
|
<div class="example"><h4 class="sectiontitle">Example 5: Starting Database Monitoring For All Jobs and Filtering
|
|
SQL Statements That Run Over 10 Seconds</h4><pre>STRDBMON OUTFILE(LIB41/DBMONFILE) JOB(*ALL) RUNTHLD(10)</pre>
|
|
<p>This
|
|
command starts database monitoring for all jobs. Monitor records are created
|
|
only for those SQL statements whose estimated run time meets or exceeds 10
|
|
seconds.</p>
|
|
</div>
|
|
<div class="example"><h4 class="sectiontitle">Example 6: Starting Database Monitoring For the Current<sup>®</sup> Job
|
|
and Filtering Over a Specific File</h4><pre>STRDBMON OUTFILE(LIB41/DBMONFILE) JOB(*) FTRFILE(LIB41/TABLE1) </pre>
|
|
<p>This
|
|
command starts database monitoring for the current job. Monitor records are
|
|
created only for those SQL statements that use file TABLE1 in Library LIB41.</p>
|
|
</div>
|
|
<div class="example"><h4 class="sectiontitle">Example 7: Starting Database Monitoring For the Current Job
|
|
and the Current User</h4><pre>STRDBMON OUTFILE(LIB41/DBMONFILE) JOB(*) FTRUSER(*CURRENT)</pre>
|
|
<p>This
|
|
command starts database monitoring for the current job. Monitor records are
|
|
created only for those SQL statements that are executed by the current user.</p>
|
|
</div>
|
|
<div class="example"><h4 class="sectiontitle">Example 8: Starting Database Monitoring For Jobs Beginning
|
|
With 'QZDA' and Filtering Over Run Time and File</h4><pre>STRDBMON OUTFILE(LIB41/DBMONFILE) JOB(*ALL/*ALL/QZDA*)
|
|
RUNTHLD(10) FTRUSER(DEVLPR1) FTRFILE(LIB41/TTT*)</pre>
|
|
<p>This
|
|
command starts database monitoring for all jobs whose job name begins with
|
|
'QZDA'. Monitor records are created only for those SQL statements that meet
|
|
all of the following conditions:</p>
|
|
<ul><li>The estimated run time, as calculated by the query optimizer, meets or
|
|
exceeds 10 seconds</li>
|
|
<li>Was executed by user 'DEVLPR1'.</li>
|
|
<li>Uses any file whose name begins with 'TTT' and resides in library LIB41.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dms.htm" title="Start Database Monitor (STRDBMON) command gathers information about a query in real time and stores this information in an output table. This information can help you determine whether your system and your queries are performing as they should, or whether they need fine tuning. Database monitors can generate significant CPU and disk storage overhead when in use.">Monitoring your queries using Start Database Monitor (STRDBMON)</a></div>
|
|
</div>
|
|
<div class="relinfo"><strong>Related information</strong><br />
|
|
<div><a href="../cl/strdbmon.htm">Start Database Monitor (STRDBMON) command</a></div>
|
|
</div>
|
|
</div>
|
|
<img src="./deltaend.gif" alt="End of change" /></body>
|
|
</html> |