Sie sind auf Seite 1von 70

DB2 Query Monitor for OS/390



Users Guide
Version 1 Release 1

SC27-0968-00

DB2 Query Monitor for OS/390



Users Guide
Version 1 Release 1

SC27-0968-00

Note!
Before using this information and the product it supports, be sure to read the general information under notices.

First Edition (December 2000)


This edition applies to Version 1 Release 1 Modification Level 0, program number 5655E67, and to all subsequent
releases and modifications until otherwise indicated in new editions. Make sure you are using the correct edition for
the level of the product. Order Publications through your IBM representative or the IBM branch office serving your
locality.
When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any
way it believes appropriate without incurring any obligation to you.
Copyright International Business Machines Corporation 2000. All rights reserved.
US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.

Contents
Chapter 1. Introduction . . . . . .
Product Description. . . . . . . .
Highlights . . . . . . . . . . .
Performance and Security . . . . .
Performance . . . . . . . . .
Security . . . . . . . . . . .
Hardware and Software Requirements.
DB2 Version . . . . . . . . .
ISPF . . . . . . . . . . . .
DASD Datasets . . . . . . . .

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

1
1
1
1
1
1
2
2
2
2

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

3
3
3
3
3
4
4
4
4
5
5
5
6
6
6
6
6
6
6
7
7

Chapter 3. Configuring DB2 Query Monitor . . . . . .


Configuring Subsystem and DB2 Query Monitor Information.
Defining the CQMCNTFL Control File . . . . . . . .
Invoking QM . . . . . . . . . . . . . . . . .
Starting the Configuration Dialog . . . . . . . . . .
GDG Base Model DSN . . . . . . . . . . . .
DB2 Control Dataset . . . . . . . . . . . . .
DB2 Subsystem ID . . . . . . . . . . . . .
Command Selection Values . . . . . . . . . .
Configure Subsystem Information . . . . . . . . .
Configure DB2 Query Monitor-Specific Information . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

. 9
. 9
. 9
. 9
. 9
. 10
. 10
. 10
. 10
. 10
. 12
11

Chapter 2. Tailoring Query Monitor Files .


Creating Table Spaces . . . . . . . .
Bind the DB2/QM Plans . . . . . . . .
Defining JCL for a DB2/QM Subsystem . .
Defining Parameters Passed to the DB2/QM
MONITOR . . . . . . . . . . . .
SUBSYS . . . . . . . . . . . .
INTERVAL . . . . . . . . . . . .
PLANS . . . . . . . . . . . . .
DBRMS . . . . . . . . . . . . .
SQL . . . . . . . . . . . . . .
AUTHID . . . . . . . . . . . . .
EXPROF . . . . . . . . . . . .
EXCEPTIONS . . . . . . . . . .
Starting a DB2/QM Subsystem . . . . .
As a started task. . . . . . . . . .
As a job . . . . . . . . . . . . .
Stopping a DB2/QM Subsystem . . . . .
As a started task. . . . . . . . . .
As a job . . . . . . . . . . . . .
Defining Interval Processing . . . . . .

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

. . . .
. . . .
. . . .
. . . .
Subsystem
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

Chapter 4. Verifying Installation . . . . . . . . . . . . . . . . . . 13


Verifying Installation . . . . . . . . . . . . . . . . . . . . . . . 13
Chapter 5. Query Monitor Space Calculations .
Partitions and Intervals in Query Monitor . . . .
Sizing the THRDS11 Partitioned Table Space and
Create Tablespace Threads . . . . . . . .
Create Index CQM.THREADS_V11_IX . . . .
Copyright IBM Corp. 2000

. . . . . . . . .
. . . . . . . . .
Partitioning Indexspace
. . . . . . . . .
. . . . . . . . .

. . 15
. . 15
15
. . 16
. . 16

iii

iv

Sizing the BUFFPL11 Partitioned Table Space


Create Tablespace BUFFPL11 . . . . .
Create Index CQM.BUFFERPOOLS_V11_IX
Sizing the DBRMS11 Partitioned Table Space
Create Tablespace DBRMS11 . . . . .
Create Index CQM.DBRMS_V11_IX . . .
Sizing the STMTS11 Partitioned Table Space.
Create Tablespace STMTS11 . . . . .
Create Index CQM.STATEMENTS_V11_IX
Adding Data Partitions . . . . . . . . .

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

16
16
16
17
17
17
17
18
18
18

Chapter 6. Getting Started . . . . .


Overview . . . . . . . . . . . .
Functions and Concepts . . . . .
DB2 QM Subsystems . . . . .
TSO/ISPF Facility . . . . . . .
Intervals . . . . . . . . . .
Navigation Commands and Actions
Profiles . . . . . . . . . . . . .
Monitoring Profile . . . . . . . .
Agents . . . . . . . . . . .
Application Profile . . . . . . . .
Exception Profile . . . . . . . .
Exceptions . . . . . . . . .
Thresholds . . . . . . . . .
Starting IBM DB2 Query Monitor . . .
Selection Menu . . . . . . . . .
1. View Current Activity . . . . . .
2. View Past Activity . . . . . . .
3. Work with Monitoring Agents . . .
4. View DB2 Command Activity . . .
5. Work with Profiles . . . . . . .
S. Setup . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

21
21
21
21
21
21
21
22
23
23
23
23
23
23
24
24
24
24
24
24
25
25

Chapter 7. Viewing Current Activity . .


1. View Current Activity . . . . . . . .
Function . . . . . . . . . . . .
Display Threads . . . . . . . .
Features . . . . . . . . . . . .
Data . . . . . . . . . . . . .
Valid Commands Entered in the Option
Valid Line Commands . . . . . .

. . .
. . .
. . .
. . .
. . .
. . .
Field .
. . .

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

27
27
27
27
27
27
28
28

Chapter 8. Viewing Historical Activity.


2. View Past Activity . . . . . . . .
Function . . . . . . . . . . .
Features . . . . . . . . . . .
Data . . . . . . . . . . . .
Valid Line Commands . . . . .
Interval Thread Activity . . . . .

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

33
33
33
33
33
33
33

Chapter 9. Monitoring Subsystems.


3. Work with Monitoring Agents . . .
Function . . . . . . . . . .
Features . . . . . . . . . .
Data . . . . . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

35
35
35
35
35

DB2 Query Monitor for OS/390: Users Guide

.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

Valid Line Commands . . . . . . . . . . . . . . . . . . . . 35


Chapter 10. Viewing DB2/QM Command Activity
4. View DB2 Command Activity . . . . . . . .
Function . . . . . . . . . . . . . . .
Features . . . . . . . . . . . . . . .
Data . . . . . . . . . . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

37
37
37
37
37

Chapter 11. Defining Selection Criteria


5. Work with Profiles . . . . . . . .
Function . . . . . . . . . . .
Features . . . . . . . . . . .
Monitoring Profiles . . . . . .
Application Profiles . . . . . .
Exception Profiles . . . . . . .

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

39
39
39
39
39
41
43

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

Chapter 12. Setup . . . . . . . . . . . . . . . . . . . . . . . 47


Chapter 13. Common Tasks

. . . . . . . . . . . . . . . . . . . 49

Chapter 14. DB2/QM Memory


Displaying Activity . . . . .
Syntax . . . . . . . .
Output . . . . . . . .

Usage
. . .
. . .
. . .

Chapter 15. DB2 Query Monitor


Valid Commands . . . . . .
DISPLAY DATASPACES . .
INTERVAL . . . . . . .

Statistics
. . . .
. . . .
. . . .

Operator
. . . .
. . . .
. . . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

51
51
51
51

Commands
. . . . .
. . . . .
. . . . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

53
53
53
53

Appendix. Notices . . . . . . . . . . . . . . . . . . . . . . . 55
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . 57

Contents

vi

DB2 Query Monitor for OS/390: Users Guide

Chapter 1. Introduction
Product Description
IBM DB2 Query Monitor for OS/390 provides real-time and historical views into
query activity throughout your DB2 subsystems. Monitoring agents that can be
started and stopped dynamically use menu-driven criteria to watch up to 64 DB2
subsystems. With Query Monitor you can pinpoint activity that is important to your
business. This enables you to spot potential problems and take steps to resolve
these problems quickly.
One true advantage of Query Monitor is that you can choose what data is gathered
during monitoring, specify when it will be gathered, and identify about whom data
will be gathered.
When thresholds are crossed, activity is flagged for investigation and possible
termination. At intervals set by you, real-time activity is saved from memory to disk
and optionally, from disk to database.

Highlights
With Query Monitor, you can:
v Spot trouble in real-time before it causes significant waste of DB2 resources
v
v
v
v
v

Locate problem queries as they execute


Identify users and locations issuing problem queries
Set thresholds that automate early warnings and corrective actions
Terminate unwanted queries
Clear up processes that are blocking DB2 availability

v Maintain high availability

Performance and Security


Performance
IBM DB2 Query Monitor uses dataspace storage to record SQL statistical data. An
installation may limit the amount of data stored by defining monitoring selection
criteria via Monitoring Profiles. The DB2/QM Monitoring Agents do not gather
statistics on threads that do not match the specified selection criteria. Furthermore,
an installation may limit DB2/QMs use of dataspace storage by defining limits on
the sizes of the individual dataspaces.
Monitoring Agent code is optimized to ensure that the least possible overhead is
introduced. Since the monitoring agent code works solely with memory structures,
DB2/QM does not invoke OS/390 services that introduce delays and waits. A
separate task outside of monitoring agent processing offloads data from the various
dataspaces into external DB2 tables.

Security
The installation of DB2/QM requires you to have DBADMIN authority, at a minimum.
Since IBM DB2 Query Monitor displays results of executed SQL queries, it does not
compromise the integrity of the underlying DB2 subsystems it monitors. Any DB2
Copyright IBM Corp. 2000

commands DB2/QM issues on behalf of its users flow through the standard DB2
interfaces and are subject to the installations DB2 security policies.

Hardware and Software Requirements


DB2 Version
Query Monitor (QM) requires an installation of DB2, version 5 or later.

ISPF
ISPF, version 4, is required for Query Monitor.

DASD Datasets
Query Monitors libraries can reside on 3380 or 3390 DASD. The total space
required for the target library is 79 3390 tracks. The total space required for the
distribution library is 220 3390 tracks.
Query Monitor requires the following dataset:

DATASET

MEMBERS

DIRBLKS

TRACKS

SCQMLOAD

50

46

39

SCQMPENU

91

20

16

SCQMMENU

11

SCQMSAMP

SCQMDBRM

12

15

SCQMSLIB

SCQMCLST

DB2 Query Monitor for OS/390: Users Guide

Chapter 2. Tailoring Query Monitor Files


To install Query Monitor you must tailor specific DB2 Query Monitor files for your
system.

Creating Table Spaces


Tailor and run the member CQM#DDL from the SCQMSAMP library to create the
tablespaces required for DB2/QM interval processing. IBM recommends placing
these tablespaces in a separate bufferpool and storage group. For information on
size requirements for these tablespaces, refer to Chapter 5.
Define the DB2/QM tablespaces only in the DB2 subsystem that will store DB2/QM
interval data.

Bind the DB2/QM Plans


Tailor and run the job CQM#BIND from the SCQMSAMP library to bind the DB2/QM
plans.

Defining JCL for a DB2/QM Subsystem


A DB2/QM subsystem may run as a started task or as a job under the control of
JES. If you wish to run DB2/QM as a started task, the JCL must reside in a
catalogued procedure library. Tailor the following statements to define JCL for a
DB2/QM subsystem. The member CQMPROC of the SCQMSAMP library contains
a copy of this JCL.
//CQMPROC PROC HILEVEL=CQM.V1R1,
//CQMPROC EXEC PGM=CQMMAIN.
//PARM=(SUBSYS(TEST),
//
MONITOR(DSN)
//
PLANS(1500),
//
DBRMS(5000),
//
SQL(300000),
//
INTERVAL(60))
//STEPLIB DD DSN=&HILEVEL..SCQMLOAD,DISP=SHR
//SYSUDUMP DD SYSOUT=*,

For a description of the parameters passed to CQMMAIN, see Defining


Parameters Passed to the DB2/QM Subsystem, below.

Defining Parameters Passed to the DB2/QM Subsystem


The CQMMAIN program uses the following parameters to define the DB2/QM
subsystem name, the monitored DB2 subsystems, the length of the recording
interval, and the pool sizes that contain the DB2/QM measurement blocks.
Code these parameters on the PARM keyword of the EXEC statement or place
them in a 80 bytes parameter file allocated to the CQMPARMS DD.
When using CQMPARMS parameter file, DB2/QM ignores the parameters coded on
the EXEC statement. Use a hyphen to continue lines in the CQMPARMS parameter
file and do not code line numbers.

Copyright IBM Corp. 2000

MONITOR
Syntax:
MONITOR(db2_subsys1,profile_name1,db2_subsys2,profile_name2.)
The MONITOR parameter is a given instance that DB2/QM records SQL
performance data for, defined for the DB2 subsystems. A given DB2/QM subsystem
can monitor up to 64 DB2 subsystems.
Example:
MONITOR(R51A,R51APROF,R51B,R51BPROF)

The above example instructs DB2/QM to start monitoring agents for DB2
subsystems R51A and R51B at startup. The parameter also instructs the monitoring
agents for DB2 subsystems R51A and R51B to use monitoring profiles R51APROF
and R51BPROF, respectively

SUBSYS
Syntax:
SUBSYS(db2qm_subsystem_name)
The SUBSYS parameter defines the DB2/QM subsystem name. A DB2/QM
subsystem does not correspond to an OS/390 subsystem. The name must be 1-4
characters in length.
Example:
SUBSYS(DBQM)

INTERVAL
Syntax:
INTERVAL(recording_interval_length)
The INTERVAL parameter defines the length of the recording interval in minutes.
The length of the recording interval can range from 1 to 86400 minutes.
Example
INTERVAL(30)

The above example defines a recording interval length of 30 minutes.

PLANS
Syntax:
PLANS(size_of_plan_measurement_block_pool)
The PLANS parameter defines the size of the DB2/QM plan measurement block
pool. DB2/QM records data related to plan execution in plan measurement blocks.
Define a plan measurement block pool size large enough to contain the maximum
amount of plans executed within the recording interval.
Note: DB2/QM operation does not require this parameter. Only use this parameter
to limit the amount of dataspace storage used by DB2/QM.

DB2 Query Monitor for OS/390: Users Guide

If DB2/QMs dataspace storage requirements exceed the limitations imposed


by this parameter, SQL measurement data may be lost. Omitting this
parameter forces DB2/QM to set the limit to the amount of blocks that can fit
into a 2GB dataspace. The amount of control blocks, or nodes available, can
be determined by issuing an F DB2QM,DISPLAY DATASPACES command
after startup.

DBRMS
Syntax:
DBRMS(size_of_dbrm_measurement_block_pool)
The DBRMS parameter defines the size of the DB2/QM DBRM measurement block
pool. DB2/QM records data related to statement execution within a DBRM/Package
in DBRM measurement blocks. Define the DBRM measurement block pool size
large enough to contain the maximum amount of individual SQL statements
executed within a recording interval.
Note: DB2/QM operation does not require this parameter. Only use this parameter
to limit the amount of dataspace storage used by DB2/QM.
If DB2/QMs dataspace storage requirements exceed the limitations imposed
by this parameter, SQL measurement data may be lost. Omitting this
parameter forces DB2/QM to set the limit to the amount of blocks that can fit
into a 2GB dataspace. The amount of control blocks, or nodes available, can
be determined by issuing an F DB2QM,DISPLAY DATASPACES command
after startup.

SQL
Syntax:
SQL(size_of_sql_image_pool)
The SQL parameter defines the size of the DB2/QM SQL image block pool.
DB2/QM records SQL statement images in SQL image blocks. Define SQL image
block pool size large enough to contain the maximum amount of statement images
captured within the recording interval. Each SQL image block contains 80
characters of a given SQL image. DB2/QM can use multiple SQL image blocks to
represent up to 4096 bytes of a given SQL image.
Note: DB2/QM operation does not require this parameter. Only use this parameter
to limit the amount of dataspace storage used by DB2/QM.
If DB2/QMs dataspace storage requirements exceed the limitations imposed
by this parameter, SQL measurement data may be lost. Omitting this
parameter forces DB2/QM to set the limit to the amount of blocks that can fit
into a 2GB dataspace. The amount of control blocks, or nodes available, can
be determined by issuing an F DB2QM,DISPLAY DATASPACES command
after startup.

AUTHID
Syntax:
AUTHID(DB2 AUTHID)
Chapter 2. Tailoring Query Monitor Files

The AUTHID parameter defines the DB2 AUTHID that DB2/QM uses to establish a
connection to DB2 during interval processing.
Example:
AUTHID(DB2USER)

The above example identifies DB2USER as the DB2 Authid that DB2/QM will use to
connect to DB2 during interval processing.

EXPROF
Syntax:
EXPROF(EXCEPTION_PROFILE_NAME)
The EXPROF parameter defines the name of the exception profile that DB2/QM
loads at startup.
Example:
EXPROF(R51AEXPF)

The above example instructs DB2/QM to use the exception profile EXPRF1.

EXCEPTIONS
Syntax:
EXCEPTIONS(EXCEPTION_SCAN_INTERVAL_LENGTH)
The EXCEPTIONS keyword defines the length of the exception scan interval in
seconds. The default scan interval length is 30 seconds.
Example:
EXCEPTIONS(10)

The above example defines an exception scan interval length of 10 seconds.

Starting a DB2/QM Subsystem


As a started task
Issue the MVS START command to start the started procedure JCL.
Example:
START CQMPROC

As a job
Submit the DB2/QM JCL from TSO or ISPF.
Example:
//CQMJOB JOB, DB2QM,CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID
//STEP1
EXEC CQMPROC

Stopping a DB2/QM Subsystem


As a started task
Issue the MVS STOP command to stop the DB2/QM started procedure.
Example:
P CQMPROC

DB2 Query Monitor for OS/390: Users Guide

As a job
Issue the MVS STOP command to stop the DB2/QM job. Follow the procedures for
stopping a DB2/QM started task, above.
Note: The MVS CANCEL command can terminate a DB2/QM subsystem.
Avoid using the MVS FORCE command to terminate a DB2/QM
subsystem. Unpredictable results may occur otherwise, including the
termination of any monitored DB2 subsystems.

Defining Interval Processing


The installation of DB2/QM requires you to choose optimum values for the length of
time that DB2/QM holds related SQL performance data in memory. Too long of an
interval may degrade system performance due to DB2/QMs use of processor
storage and too small of an interval may cause DB2/QM to thrash writing data to its
related DB2 tables.
The INTERVAL, AUTHID, and MONITOR parameters relate directly to interval
processing. Definitions are required in the CQMCNTFL control file that define how
DB2/QM attaches to DB2. DB2/QM uses the first DB2 subsystem listed in the
MONITOR parameter to record its interval SQL performance data.
1. Tailor member CQM@UDB2 in the SCQMSAMP library. This JCL unloads
DB2/QM interval data to history datasets.
2. Tailor member CQM@LDB2. This JCL loads off-loaded DB2/QM interval data
into the HISTORY INTERVAL table.
The CQM@UDB2 member unloads all partitions of interval data that have not been
unloaded. Thus, a single run of this job can unload all data for a day. You can also
submit this job every time interval processing is started, on the hour. A GDG base
should be created before running this job. Make sure you set the limit on the GDG
base large enough to hold all data you want to keep. For example, if you are going
to run this job once a day and you want to keep a month of data, set the limit to 30.
The CQM@LDB2 job takes the off-loaded dataset and loads it back into a
HISTORY version of the DB2/QM tables. This data is not deleted from these tables
until the CQM@LDB2 job is re-run. This job loads data back into the HISTORY
INTERVAL table. This job lets you load multiple unloaded datasets that are
concatenated into one run.
Some of the programs in the load library must run APF authorized. Include the load
library (SCQMLOAD) as part of your authorized list.

Chapter 2. Tailoring Query Monitor Files

DB2 Query Monitor for OS/390: Users Guide

Chapter 3. Configuring DB2 Query Monitor


You must configure subsystem- and DB2 Query Monitor-specific information for
correct functioning of the tools.

Configuring Subsystem and DB2 Query Monitor Information


Defining the CQMCNTFL Control File
Skip this step if you created the CQMCNTFL control file for another DB2 tool.
Otherwise, edit the member CQMCNTFL in your SCQMSAMP library. Instructions
on how to modify this member are contained within the member itself. This JCL
creates the configuration VSAM file. Submit the JCL after making any modifications
to create the configuration VSAM file.

Invoking QM
You will tailor two CLISTs found in SCQMSAMP to invoke QM. Change the CLIST
CQM as follows:
v PROC 0 CLISTLIB()
v PROC 0 CLISTLIB(hlq.SCQMSAMP)
Change the CLIST CQMCLIST as follows:
v PROC 0 HILEVEL(&HILEVEL)
v PROC 0 HILEVEL(hlq)
And also change:
v ALLOC FILE(DB2PARMS) DA(&HILEVEL.DB2.CONTROL) SHR REUSE
v ALLOC FILE(DB2PARMS) DA(hlq.DB2.CONTROL) SHR REUSE, where the hlq
will be the data set high level qualifier of the one control file created in
CQMCNTFL or the hlq of the preexisting CONTROL file, if this step was skipped.
To invoke QM, execute the CLIST CQMCLIST.

Starting the Configuration Dialog


To start the configuration dialog, invoke the CQMCLIST, and select option S for
Setup. The following panel is displayed:

Copyright IBM Corp. 2000

--------------------------Enter DB2 System Parameters------------------------Command ==>


GDG Base Model DSN
DB2 Control Dataset
(Pre-allocated)

==>
==>

Enter DB2 Subsystem Info:


DB2 Subsystem ID

==>

(1-4 Character Subsystem ID)

Valid command selection values are:


1: ZPARM, BSDS, and Load Library Information
2: DB2 Query Monitor Parameters

GDG Base Model DSN


Enter the reference dataset to use for dataset creation processing.

DB2 Control Dataset


This field displays the dataset that is used as the control file.

DB2 Subsystem ID
Enter the subsystem identifier (SSID) for the DB2 subsystem you want to configure.
This is a four-character maximum field. You must run through the following
configuration steps and specify the appropriate SSID in this field for each
subsystem against which you want to run DB2 Query Monitor.

Command Selection Values


Enter a valid sub-selection code to display one of the lower level screens.
Valid values are:
1. Information specific to a particular DB2 subsystem, including ZPARM, BSDS,
and load library information.
2. Information specific to DB2 Query Monitor.

Configure Subsystem Information


Choose option 1 in the Option field. This option is for ZPARM, BSDS, and load
library information. The following panel is displayed:

10

DB2 Query Monitor for OS/390: Users Guide

----------------- Update Parameters for DB2 Subsystem ----------------Command ==>


Enter or Update Specific DB2 Parameters :
DB2 ZPARMs Member
==>
DB2 Bootstrap DSN #01 ==>
DB2 Bootstrap DSN #02 ==>
DB2 Loadlib1
==>
DB2 Loadlib2
==>
DB2 Loadlib3
==>
DB2 Loadlib4
==>
DB2 Loadlib5
==>

DB2 ZPARMs member


Enter the eight-character ZPARM load module member name generated for this
DB2 subsystem.
BSDS #1 & BSDS #2
Enter the full dataset names of the two boot strap datasets being used by this DB2
subsystem.
DB2 Loadlib 1 through 5
Enter the names of the datasets that comprise the current loadlib concatenation for
DB2. This concatenation is usually a subsystem-specific DSNEXIT library, the base
DSNEXIT library for the current DB2 version, and the base DSNLOAD library for
the current DB2 version. If necessary, two extra library spaces are provided.

Configure DB2 Query Monitor-Specific Information


Choose option 2 in the Option field. This option is for DB2 Query Monitor-specific
information. The following panel is displayed:

Chapter 3. Configuring DB2 Query Monitor

11

----- DB2 Query Monitor - Update Parameters for DB2 Subsystem


Command ==>
Enter or Update Specific DB2 Parameters :
Plan #1 Name
==>

Plan Name
Enter the eight-character plan name for DB2 Query Monitor. This is the same plan
name used in member CQM#BIND in the SCQMSAMP library when you bound the
plan for DB2 Query Monitor in the preceding steps.
Note: You must reconfigure subsystem information for each DB2 that records
DB2/QM interval data.

12

DB2 Query Monitor for OS/390: Users Guide

Chapter 4. Verifying Installation


You should verify the installation of DB2 Query Monitor on your system by starting
the product.

Verifying Installation
1. Start a DB2/QM subsystem to monitor a given DB2 subsystem. For information
on monitoring DB2 subsystems, see the MONITOR parameter in Chapter 2,
Tailoring Query Monitor Files.
2. Issue the following query against the monitored DB2 subsystem using a tool
such as DB2s SPUFI:
SELECT * FROM SYSIBM.SYSDUMMY1;

3. Enter the DB2/QM ISPF Dialog. Enter option 1 from the DB2/QM Primary
Option menu. You should see the thread you created by entering the query in
Step #2.

Copyright IBM Corp. 2000

13

14

DB2 Query Monitor for OS/390: Users Guide

Chapter 5. Query Monitor Space Calculations


DB2 objects (such as DATABASE and TABLESPACE) are built in DB2 during QM
installation to store data collected by QM. The DDL to build these objects requires
some calculations for space prior to the creation of the objects.
In particular, the partition tablespace sizes for THRDS11, BUFFPL11, DBRMS11,
and STMTS11 (threads, bufferpools, DBRMS, and statements) must be determined,
based on certain estimates provided by the installer at install time. Coincidental to
these calculations are the space calculations necessary for the partitioned index
spaces that accompany each partitioned tablespace.
Following is a discussion of the sizing issues related to each of these tablespaces
and accompanying index spaces. As with all DB2 objects, the accuracy of the
estimates determines the degree to which the QM objects are successfully space
managed. As with all DB2 objects, these sizes can be altered as new information is
made available for space management. These objects require the same DBA
administration required by all DB2 objects for optimal management.
The following discussion and guidelines are intended as an installation starting point
in the space management of the QM objects to be created in the installation of the
product.

Partitions and Intervals in Query Monitor


For each of the partitioned tablespaces, the installation instructions and
accompanying DDL provide for 24 partitions per tablespace. This is in line with the
QM recommendation of setting interval size to 60 minutes, and reusing partitions
daily.
These partitions are used in a wrap around fashion. QM writes to a partition for
an interval set at install time. When the end of an interval is reached and a new
interval begins, QM initializes the next partition and writes the new interval to that
partition. When all partitions are full, QM writes the next interval of data to the first
partition (effectively reusing that partition). If additional partitions are desired to
extend wrap around time, the tablespace can be initially built with more partitions,
or can be altered to add partitions. See Adding Data Partitions below for more
information on running QM with additional partitions.
The size of each partition in the create DDL is determined based on an estimate of
activity that occurs during one interval. If the interval is set to 60 minutes, then the
estimate is for activity within a 60 minute timeframe. If the interval is set to
something other than 60 minutes, then the estimate should be based on expected
activity during the selected interval duration.

Sizing the THRDS11 Partitioned Table Space and Partitioning


Indexspace
There is one table in the THRDS11 (threads) tablespace, named
CQM.THREADS_V11. A row is stored in the CQM.THREADS_V11 table for each
occurrence of a thread during the interval. You should allow for 900 bytes of data
per row when calculating space for this tablespace. You should try to place all data
in the PRIQTY, with a SECQTY equal to at least 20% of the PRIQTY.

Copyright IBM Corp. 2000

15

The PRIQTY of the partitioning index CQM.THREADS_V11_IX should be at least


15% of the PRIQTY for the tablespace. The SECQTY of the partitioning index
should be at least 5% of the PRIQTY for the tablespace. The minimum calculation
for PRIQTY and SECQTY in the CREATE TABLESPACE and CREATE INDEX DDL
is: Let n equal the number of estimated threads per interval.
Let ROUND be the process of rounding up to the nearest integer.

Create Tablespace Threads


PRIQTY = ROUND((1000n)/1024) + 72
SECQTY= ROUND((.2)(PRIQTY))

Create Index CQM.THREADS_V11_IX


PRIQTY = ROUND((tablespace PRIQTY)(.15)) SECQTY= ROUND((tablespace
PRIQTY)(.05))
Example: If the number of estimated threads per minute is 180, and the interval is
set to 60 minutes, then the calculation for the THRDS11 tablespace is:
n = (180)(60) = 10800
(1000)(10800) = 10800000
ROUND(10800000/1024) = 10547
10547+ 72 = 10619
Tablespace PRIQTY 10619
Tablespace SECQTY 2124
Indexspace PRIQTY 1593
Indexspace SECQTY 531

Sizing the BUFFPL11 Partitioned Table Space


There is one table in the BUFFPL11 (bufferpool) tablespace, named
CQM.BUFFERPOOLS_V11. A row is stored in the CQM.BUFFERPOOLS_V11 table
for each unique plan accessing a distinct bufferpool during that interval. If a plan
accesses two bufferpools and is executed one or more times during the interval,
there are two rows inserted into this table. If another plan accesses the same two
bufferpools, accesses a third bufferpool, and is executed one or more times during
the interval, there are an additional three rows inserted into the table. Data is rolled
up by plan and bufferpool. You should allow for 120 bytes of data per row when
calculating space for this tablespace. You should try to place all data in the
PRIQTY, with a SECQTY equal to at least 20% of the PRIQTY. The PRIQTY of the
partitioning index CQM.BUFFERPOOLS_V11_IX should be at least 20% of the
PRIQTY for the tablespace. The SECQTY of the partitioning index should be at
least 10% of the PRIQTY for the tablespace. The minimum calculation for PRIQTY
and SECQTY in the CREATE TABLESPACE and CREATE INDEX DDL is: Let n
equal the number of estimated plan/bufferpool combinations per interval.
Let ROUND be the process of rounding up to the nearest integer.

Create Tablespace BUFFPL11


PRIQTY = ROUND((120n)/1024) + 72
SECQTY= ROUND((.2)(PRIQTY))

Create Index CQM.BUFFERPOOLS_V11_IX


PRIQTY = ROUND((tablespace PRIQTY)(.2))
SECQTY= ROUND((tablespace PRIQTY)(.1)) Example: If the number of estimated
plans to be executed in an interval is 90, each plan accesses two bufferpools, and

16

DB2 Query Monitor for OS/390: Users Guide

the interval is set to 60 minutes, then the calculation is: n = (90)(2)(60) = 10800
(120)(10800) = 1296000
ROUND(1296000/1024) = 1266
1266 + 72 = 1338
Tablespace PRIQTY 1338
Tablespace SECQTY 268
Indexspace PRIQTY 268
Indexspace SECQTY 134

Sizing the DBRMS11 Partitioned Table Space


There is one table in the DBRMS11 tablespace, named CQM.DBRMS_V11. A row is
stored in the CQM.DBRMS_V11 table for each combination of a unique DBRM and
SQL statement executed during that interval. Data is rolled up by DBRM and SQL
statement. You should allow for 600 bytes of data per row when calculating space
for this tablespace. You should try to place all data in the PRIQTY, with a SECQTY
equal to at least 20% of the PRIQTY. The PRIQTY of the partitioning index
CQM.DBRMS_V11_IX should be at least 15% of the PRIQTY for the tablespace.
The SECQTY of the partitioning index should be at least 5% of the PRIQTY for the
tablespace. The minimum calculation for PRIQTY and SECQTY in the CREATE
TABLESPACE and CREATE INDEX DDL is: Let n equal the number of estimated
DBRM/SQL statement combinations per interval.
Let ROUND be the process of rounding up to the nearest integer.

Create Tablespace DBRMS11


PRIQTY = ROUND((600n)/1024) + 72
SECQTY= ROUND((.2)(PRIQTY))

Create Index CQM.DBRMS_V11_IX


PRIQTY = ROUND((tablespace PRIQTY)(.15))
SECQTY= ROUND((tablespace PRIQTY)(.05)) Example: If the number of estimated
DBRMS to be executed in an interval is 50, and 20 executes three SQL
STATEMENTS each while the other 30 executes four SQL STATEMENTS each,
and the interval is set to 60 minutes, then the calculation is: n = ((20)(3) +
(30)(4))(60) = 10800
(600)(10800) = 6480000
ROUND(6480000/1024) = 6329
6329 + 72 = 6401
Tablespace PRIQTY 6401
Tablespace SECQTY 1281
Indexspace PRIQTY 961
Indexspace SECQTY 321

Sizing the STMTS11 Partitioned Table Space


There is one table in the STMTS11 (statements) tablespace, named
CQM.STATEMENTS_V11. A row is stored in the CQM.STATEMENTS_V11 table for
each combination of a unique DBRM and SQL statement executed during that
interval. Data is rolled up by DBRM and SQL statement. You should allow for 125
bytes of data per row when calculating space for this tablespace. You should try to
place all data in the PRIQTY, with a SECQTY equal to at least 20% of the PRIQTY.
The PRIQTY of the partitioning index CQM.STATEMENTS_V11_IX should be at
least 20% of the PRIQTY for the tablespace. The SECQTY of the partitioning index
should be at least 10% of the PRIQTY for the tablespace. The minimum calculation
for PRIQTY and SECQTY in the CREATE TABLESPACE and CREATE INDEX DDL
Chapter 5. Query Monitor Space Calculations

17

is: Let n equal the number of estimated DBRM/SQL statement combinations per
interval.
Let ROUND be the process of rounding up to the nearest integer.

Create Tablespace STMTS11


PRIQTY = ROUND((125n)/1024) + 72
SECQTY= ROUND((.2)(PRIQTY))

Create Index CQM.STATEMENTS_V11_IX


PRIQTY = ROUND((tablespace PRIQTY)(.2))
SECQTY= ROUND((tablespace PRIQTY)(.1)) Example: If the number of estimated
DBRMS to be executed in an interval is 50, and 20 executes three SQL
STATEMENTS each while the other 30 executes four SQL STATEMENTS each,
and the interval is set to 60 minutes, then the calculation is: n = ((20)(3) +
(30)(4))(60) = 10800
(125)(10800) = 1350000
ROUND(1350000/1024) = 1319
1319 + 72 = 1391
Tablespace PRIQTY 1391
Tablespace SECQTY 279
Indexspace PRIQTY 279
Indexspace SECQTY 140

Adding Data Partitions


Although this documentation and accompanying installation DDL build the QM
partition tablespaces with 24 partitions, you can add additional partitions to the QM
partitioned tablespaces. The only limitation, other than DB2 limitations on partitioned
tablespaces, is that all QM partitioned tablespaces must contain the same number
of partitions. The tablespaces THRDS11, DBRMS11, BUFFPL11, and STMTS11
must all have the same number of partitions.
To install the QM objects with more (or less) than the 24 partitions, you must
change the DDL that creates the tablespaces and partitioning indexes. The DDL is
found in the dataset SCQMSAMP, with a member name of CQM#DDL. To add
partitions 25, 26, 27, 28, 29, and 30 to the THRDS11 tablespace, make the
following changes to the CREATE TABLESPACE THREADS... DDL:
CREATE TABLESPACE THREADS IN CQMDB . . . PART 24 COMPRESS YES,
PART 25 COMPRESS YES, PART 26 COMPRESS YES, PART 27 COMPRESS
YES, PART 28 COMPRESS YES, PART 29 COMPRESS YES, PART 30
COMPRESS YES) LOCKSIZE PAGE BUFFERPOOL BP4 CLOSE NO CCSID
EBCDIC; Remember that if you change the number of partitions in one of the
partitioned tablespaces, you must make the same change to use the same number
of partitions in all, including THRDS11, DBRMS11, BUFFPL11, and STMTS11. If
you change the number of partitions in a tablespace, you must also alter the DDL
that creates the partitioning index. For the above example in which the THRDS11
tablespace was given six additional partitions (25, 26, 27, 28, 29, and 30), the
CREATE TYPE 2 INDEX CQM.THREADS_V11_IX DDL needs to be altered as
follows:
CREATE TYPE2 INDEX CQM.THREADS_V11_IX ON CQM.THREADS_V11 . . .
(PART 01 VALUES(01,2147483647) ,PART 02 VALUES(02,2147483647) ,PART 03
VALUES(03,2147483647) ,PART 04 VALUES(04,2147483647) ,PART 05
VALUES(05,2147483647) ,PART 06 VALUES(06,2147483647) ,PART 07

18

DB2 Query Monitor for OS/390: Users Guide

VALUES(07,2147483647) ,PART 08 VALUES(08,2147483647) ,PART 09


VALUES(09,2147483647) ,PART 10 VALUES(10,2147483647) ,PART 11
VALUES(11,2147483647) ,PART 12 VALUES(12,2147483647) ,PART 13
VALUES(13,2147483647) ,PART 14 VALUES(14,2147483647) ,PART 15
VALUES(15,2147483647) ,PART 16 VALUES(16,2147483647) ,PART 17
VALUES(17,2147483647) ,PART 18 VALUES(18,2147483647) ,PART 19
VALUES(19,2147483647) ,PART 20 VALUES(20,2147483647) ,PART 21
VALUES(21,2147483647) ,PART 22 VALUES(22,2147483647) ,PART 23
VALUES(23,2147483647) ,PART 24 VALUES(24,2147483647) ,PART 25
VALUES(25,2147483647) ,PART 26 VALUES(26,2147483647) ,PART 27
VALUES(27,2147483647) ,PART 28 VALUES(28,2147483647) ,PART 29
VALUES(29,2147483647) ,PART 30 VALUES(30,2147483647)) BUFFERPOOL BP4
CLOSE NO;

Chapter 5. Query Monitor Space Calculations

19

20

DB2 Query Monitor for OS/390: Users Guide

Chapter 6. Getting Started


IBM DB2 Query Monitor for OS/390 allows you to monitor query, thread, bufferpool,
and other DB2 resources.

Overview
IBM DB2 Query Monitor allows system administrators and/or DBAs to monitor DB2
resource consumption and pinpoint inefficient or improperly coded SQL statements.
IBM DB2 Query Monitor performs this task with minimal system overhead, and
without running expensive DB2 traces.
IBM DB2 Query Monitor allows the user to view statistics about current and
historical SQL activity. It also allows dynamic monitoring of DB2 subsystems. Users
may define profiles that filter performance data at the monitoring- and display
interface levels. Additionally, exception conditions can be set up to alert users when
specific SQL related thresholds exceed defined limits.

Functions and Concepts


This section describes functionality and concepts that are unique to IBM DB2 Query
Monitor.

DB2 QM Subsystems
A DB2 QM Subsystem records SQL performance statistics related to one or more
DB2 Subsystem. A DB2 QM Subsystem may run as a started task or job.
Each DB2 QM Subsystem can monitor and record SQL performance data for up to
64 DB2 Subsystems; however, a given DB2 Subsystem cannot be monitored by
more than one DB2 QM Subsystem. Interval data for all DB2 Subsystems defined
in a DB2 QM Subsystem is stored in one DB2.

TSO/ISPF Facility
The TSO/ISPF facility of DB2 Query Monitor allows the end user to display DB2
SQL performance data. This feature allows the end user to determine what impact
certain SQL processing has on DB2 resources. End users of the ISPF facility can
view SQL performance data at the plan level and at the DBRM/Package statement
level.

Intervals
Intervals are segments of time defined by the administrator, into which data is
divided once captured. When you view past SQL activity you are viewing data for a
discrete period in time.
Current interval data resides in memory; whereas, prior interval data resides in
partitioned table spaces.
Intervals are defined by the INTERVAL startup parameter. For further information on
setting Intervals refer to Chapter 2, Tailoring Query Monitor Files.

Navigation Commands and Actions


DB2 Query Monitor is a TSO/ISPF application that responds to standard TSO/ISPF
commands. This section describes additional IBM DB2 Query Monitor features that
have been developed to help you use and navigate through the application.

Copyright IBM Corp. 2000

21

SORT: When presented with a panel of scrollable or tabular data, you can sort the
data by column using the SORT command.
The command structure for sorting is as follows: SORT COLUMN_NAME D
Columns are referenced by the column name or column number. Type column
names as they appear on the column heading, except when the column name
contains a space (for which you must use an underscore (_)). Column numbers are
not labeled on the panel; instead, they are numbered from left to right across the
panel. The CMD column is column 1, and columns to the right are numbered
sequentially.
Data can be sorted in either ascending (A), or descending (D) order. To specify sort
order, append the A or D to the end of the SORT command. The default is
ascending.
For example, to sort column 2 in descending order, type: SORT 2 D at the
command line. This sorts the data in descending order by column 2.
FIND: The FIND command allows you to find a unique string within a panel of
data.
The command structure for FIND is as follows: FIND ABC
If the specified string is found, the cursor moves to the first position of the found
string. If the specified string is not found, the message Find string not found is
displayed.
Be as specific as possible you use the FIND command to receive an optimal return.
Scrolling: When presented with data that exceeds the size of the panel, indicators
have been provided to alert you that additional data exists outside the visible panel.
Four character spaces on line 3 of the upper right-hand corner of the panel indicate
a scrollable page. Pages may be scrollable horizontally, vertically, or both.
A plus sign (+) and/or a minus sign (-) indicates that there is additional data
vertically. Use PF8 to scroll down. Use PF7 to scroll up.
The less-than sign (<) and/or the greater-than sign (>) indicates that there is
additional data horizontally. Use PF10 to scroll to the left. Use PF11 to scroll to the
right.
Color Coding: DB2 Query Monitor uses color to convey information. If you are
working on a terminal or other panel that does not support color displays, you will
not see this feature.
Printing: You can print the contents of any IBM DB2 Query Monitor panel by
typing PRINTX at any Option line. There is no system feedback, although the
current display is written to the RSCPRINT DD of your TSO session.

Profiles
There are several types of profiles, each providing means to customize data
monitoring and collection.

22

DB2 Query Monitor for OS/390: Users Guide

Monitoring Profile
The Monitoring Profile defines what activity each monitoring agent will capture, such
as activity involving connections, users, plans, or DBRMs of a DB2 subsystem.

Agents

Monitoring Agent refers to the interface that DB2 QM installs within a DB2
subsystem to capture SQL performance data.

Application Profile
The Application Profile defines what data will be displayed out of the data collected.
Each user can have his or her own profile.

Exception Profile
The Exception Profile specifies acceptable limits of processing.

Exceptions
An exception is a condition that occurs when a defined threshold has been
exceeded.
The Exception Profile specifies what threads are within acceptable limits. When a
thread is outside an acceptable limit, an exception is generated and displayed in
red on the screen.

Thresholds
A threshold is a defined limit on SQL processing initiates an exception condition
when it has been exceeded.
Thresholds can be set in the Exception Profile panel.
Thresholds can be set up for:
v Total SQL calls
v
v
v
v
v
v

Total Getpages
Lock requests
CPU time
Elapsed time
Application CPU time
Application elapsed time

Chapter 6. Getting Started

23

Starting IBM DB2 Query Monitor


Selection Menu
This is the Main Menu of IBM DB2 Query Monitor:
CQM$MAIN V1R1 ---------- IBM DB2 Query Monitor ----------------Option ===> __________________________________________________________________
DB2 QM Subsystem ID:

User:

------------------------------------------------------------------------------1.

View Current Activity

2.

View Past Activity

3.

Work with Monitoring Agents

4.

View DB2 Command Activity

5.

Work with Profiles

S.

Setup

X.

Exit Query Monitor

Enter END command to return to ISPF.

1. View Current Activity


View Current Activity allows you to see performance data for the current interval.
Type 1 to display the View Current Activity panel.

2. View Past Activity


View Past Activity allows you to view performance data for previous intervals.
Type 2 display the View Past Activity panel.

3. Work with Monitoring Agents


Work with Monitoring Agents allows you to turn the monitoring agents on and off for
specific DB2 subsystems.
Type 3 to display the Work with Monitoring Agents panel.

4. View DB2 Command Activity


View DB2 Command Activity allows you to view DB2 commands that have been
executed.
Type 4 display the DB2 Commands Executed panel.

24

DB2 Query Monitor for OS/390: Users Guide

5. Work with Profiles


Work with Profiles allows you to determine what data gets collected, what data is
displayed, and what data generates exceptions.
Type 5 to display the Work with Profiles panel.

S. Setup
Use the Setup command to tailor DB2 parameters in the control file, which allows
DB2/QM interval processes to connect to DB2. See Chapter 12, Setup, for more
information.
Type S to display the Enter DB2 System Parameters panel.

Chapter 6. Getting Started

25

26

DB2 Query Monitor for OS/390: Users Guide

Chapter 7. Viewing Current Activity


With IBM DB2 Query Monitor, you can view current activity.

1. View Current Activity


Select option 1, View Current Activity from the Selection panel to display the Thread
Activity panel:
CQM$DTHR V1R1
------- DB2 QM Thread Activity -----Option ===> ________________________________________________ Scroll ===> PAGE
------------------------------------------------------------------------+>
DB2 QM Subsystem:
Current Interval Started:
------------------------------------------------------------------------------Display Threads:

(Active/Interval)

(Detail/Summarize)

-------------------------------------------------------------------------------Cmd

SSID Intv

Plan Name Job Name

DB2 CPU Time

DB2 Elapsed

SQL Calls

Valid Line Commands: (Sql detail, Instruction totals, Buffers, Delays, Locks)

Function
The Thread Activity panel shows SQL thread activity in the current interval.

Display Threads
Active/Interval: This setting allows the user to display threads that are currently
active in DB2 or threads that have been active sometime within the current interval.
Detail/Summarize: This setting allows the user to display the data about thread
activity on a detail level or to summarize by plan name.

Features
Data
The following columns are part of the Thread Activity panel:
1.
2.
3.
4.
5.
Copyright IBM Corp. 2000

SSID (DB2 Subsystem ID)


Intv (Interval Indicator)
Plan Name
Job Name
DB2 CPU Time

27

6.
7.
8.
9.
10.

DB2 Elapsed
SQL Calls
X Exec
Connectn (DB2 Connection Name)
APPL Elapsed

11.
12.
13.
14.
15.
16.
17.

APPL CPU
Total Getpages
Plan Name
Token
Accounting Token
Requesting Site (IP address of client for distributed thread)
NETID (Network ID)

18.
19.
20.
21.

LUNAME
AUTHID (DB2 Auth)
Plan Start Time
Plan End Time

Valid Commands Entered in the Option Field


INTV: This command displays the intervals panel, and works as a shortcut to
Option 2 from the main menu.
PROF: This command displays the Application Profiles panel, and works as a
shortcut to Option 5.2.
Panels that support line commands have explanatory text listing the valid
commands. Type the first letter of the command, which is capitalized in the
explanation, to view this information.
Note: The commands available for the panel will be overlaid if you display the PF
keys.

Valid Line Commands


The following line commands are valid on the Thread Activity panel.
If you enter invalid information for an option field (primary command), an error
message is issued indicating that an invalid command has been entered and
(typically), the extended error messages for the command will list the valid values
for the field.
SQL Detail: Type S to display the DB2 Query Monitor Plan Detail panel, which
shows activity for DBRMs and/or packages that execute under a plan.
Instruction Totals: Type I to display the Instruction counts panel, which shows
counts by instruction type that execute under a given plan.
Buffers: Type B to display the Plan Bufferpool Statistics panel, which shows
bufferpool statistics.
Delays: Type D to go to the Thread Delays panel, which shows statistics on
events that cause delays in the execution of plans or packages.

28

DB2 Query Monitor for OS/390: Users Guide

Locks: Type L to go to the Thread Locking Events panel, which shows lock
statistics.
SQL Detail: Type S to display the DB2 Query Monitor Detail panel. This panel
displays activity for DBRMs and/or packages that execute under a plan.
This is the DB2 Query Monitor Plan Detail panel:
CQM$DPLN V1R1 -------- Query Monitor Plan Detail -------Option ===> ________________________________________________ Scroll ===> PAGE
Jobname:

Plan:

DB2 SSID:

Plan Execution Count:

Totals or Averages:
(Total of all executions/Average of each execution)
------------------------------------------------------------------------------Cmd DBRM/PKG

Collection ID

DB2 CPU Time

DB2 Elapsed

SQL Calls

***************************** Bottom of Data **********************************

Valid Line Commands: (Sql detail, Buffers, Delays, Locks)

The following line commands are valid on the DB2 Query Monitor Detail panel:
Instruction totals:: Type Iin the line command field of the Thread Activity panel to
display the SQL Instruction Counts panel. This panel displays counts by instruction
type that executes under a plan.

Chapter 7. Viewing Current Activity

29

This is the Instruction Counts panel:


CQM$STHR V1R1 ---------- SQL Instruction Counts --------Option ===> ________________________________________________ Scroll ===> PAGE
Jobname:

Plan:

Totals or Averages:

DB2 SSID:

Plan Execution Count:

(Total of all executions/Average of each execution)

------------------------------------------------------------------------------Instruction
-----------

Totals Instruction
------ -----------

Totals Instruction
------ -----------

Totals
------

Valid Commands: (End)

The following line commands are valid on the SQL Instruction Counts panel:
Buffers: Type B in the line command field of the Thread Activity panel to display
the Plan Bufferpool Statistics panel. This panel will display bufferpool statistics..
This is the Plan Bufferpool Statistics panel:
CQM$BTHR V1R1
------- Plan Bufferpool Statistics ------Option ===> ________________________________________________ Scroll ===> PAGE
Jobname:
Plan:
DB2 SSID:
Plan Execution Count:
Totals or Averages:
(Total of all executions/Average of each execution)
-----------------------------------------------------------------------Bufferpool:
Get Page Requests
Buffer Pages Updated
Synchronous Pages Read
Synchronous Pages Written
Sequential Prefetch Requests
List Prefetch Requests
Dynamic Prefetch Requests
Successful Hiperpool Reads
Hiperpool Read Failures
Successful Hiperpool Writes
Unsuccessful Hiperpool Writes
Async Pages Read
Async Pages Read by Hiperpool
Valid Commands: (End)

The following line commands are valid on the Plan Bufferpool Statistics panel:

30

DB2 Query Monitor for OS/390: Users Guide

Delays: Type D to display the Thread Delays panel. This panel shows statistics on
events that cause delays in the execution of plans or packages.
This is the Thread Delays panel:
CQM$ETHR V1R1
-------------- Thread Delays ------------Option ===> ________________________________________________ Scroll ===> PAGE
Jobname:

Plan:

DB2 SSID:

Plan Execution Count:

Totals or Averages:
(Total of all executions/Average of each execution)
-----------------------------------------------------------------------+
Delay Event
Lock or Latch Delays
Synchronous I/O Delays
Other Read Delays
Other Write Delays
Service Task Switch Delays
Archive Log Quiesce Delays
Archive Log Read Delays
Drain Lock Delays
Claim Release Delays
Page Latch Delays
Stored Procedure Delays
Notify Message Delays
Global Contention Delays
Valid Commands: (End)

Event Count

Delay Time

The following line commands are valid on the Thread Delays panel:
Locks: Type L to display the Thread Locking Events panel. This panel shows lock
statistics.
This is the Thread Locking Events panel:
CQM$LTHR V1R1 ---------- Thread Locking Events --------Option ===> ________________________________________________ Scroll ===> PAGE
Jobname:

Plan:

DB2 SSID:

Plan Execution Count:

Totals or Averages:
(Total of all executions/Average of each execution)
-----------------------------------------------------------------------+
Lock Event
Lock Deadlocks
Lock Suspensions
Lock Timeouts
Latch Suspensions
Other Suspensions
Lock Requests
Unlock Requests
Query Requests
Change Requests
Other Requests
Claim Requests
Claim Failures
Drain Requests
Valid Commands: (End)

Event Count

Chapter 7. Viewing Current Activity

31

32

DB2 Query Monitor for OS/390: Users Guide

Chapter 8. Viewing Historical Activity


With IBM DB2 Query Monitor, you can view historical activity.

2. View Past Activity


Select option 2, View Past Activity from the Selection panel to display the Interval
panel:
CQM$INTV V1R1 --- DB2 QM Intervals --Option ===> _____________________________ Scroll ===> PAGE
Valid Cmds: Select,Unload Data,Load history
------------------------------------------------------------Cmd Avail Start Date Start Time End Date
End Time Prtn

Function
The Interval panel allows you to view performance data for previous intervals. The
first panel you see is a list of intervals through which you can scroll. You can use
the three valid line commands, Select, Unload Data, and Load history to work
with specific intervals.

Features
Data
The following columns are part of the Interval panel:
v Avail
v Start Date
v
v
v
v
v

Start Time
End Date
End Time
Prtn (Partition)
Offloaded Dataset

Valid Line Commands


The following Line Commands are valid on the Interval panel:
Line Command

Description

SELECT

Type S to go to the Interval Thread Activity panel, which


contains the data for the interval line item you selected.

UNLOAD DATA

Type U to unload data.

LOAD HISTORY

Type L to load history.

Interval Thread Activity


The Interval Thread Activity panel is similar to the Thread Activity panel, although
this panel shows data for prior intervals. Three additional commands are available
on this panel:

Copyright IBM Corp. 2000

33

Command

Description

NEXT

This command displays the next interval. PF6 also performs this command.

PREV

This command displays the previous interval. PF4 also performs this
command.

CURRENT

Issued from an Interval Thread Activity panel, this command displays the
current Thread Activity panel.

34

DB2 Query Monitor for OS/390: Users Guide

Chapter 9. Monitoring Subsystems


With IBM DB2 Query Monitor, you can use agents to monitor DB2 subsystems.

3. Work with Monitoring Agents


Select option 3, Work with Monitoring Agents, from the Selection panel to display
the DB2 QM Monitoring panel:
CQM$DDB2 V1R1 ------- DB2 QM Monitoring -----Option ===> ________________________________ Scroll ===> PAGE
Valid Cmds: Activate, Deactivate
--------------------------------------------------------------Cmd

Subsystem

Active

Monitored

DB2 QM SSID

Profile

Function
This panel allows you to turn monitoring agents on and off for specific DB2
subsystems.

Features
Data
Data columns in this panel include:
v Subsystem
v Active
v Monitored
v DB2 QM SSID

Valid Line Commands


The following line commands are valid for the Monitoring panel:
Activate: Type Ato activatemonitoring for the current DB2 subsystem line item.
Deactivate: Type D to deactivate monitoring for the current DB2 subsystem line
item.

Copyright IBM Corp. 2000

35

36

DB2 Query Monitor for OS/390: Users Guide

Chapter 10. Viewing DB2/QM Command Activity


With IBM DB2 Query Monitor, you can view DB2 command activity.

4. View DB2 Command Activity


Select option 4, View DB2 Command Activity, from the Selection panel to display
the DB2 Commands Executed panel:
CQM$CDMD V1R1 ------- DB2 Commands Executed ------Option ===> _______________________________________________ Scroll ===> PAGE
------------------------------------------------------------------------>
DB2 QM Subsystem:
Current Interval Started:
------------------------------------------------------------------------------Job Name Authid
Timestamp
Command Text

Function
The View DB2 Commands Executed panel allows you to view command activity.

Features
Data
Data columns in this panel include:
v Job Name
v Authid
v Timestamp
v Command Text

Copyright IBM Corp. 2000

37

38

DB2 Query Monitor for OS/390: Users Guide

Chapter 11. Defining Selection Criteria


With IBM DB2 Query Monitor, you tailor profiles to control what data is monitored
and displayed. You can also define thresholds via exception profiles that highlight
SQL activity that is outside defined parameters.

5. Work with Profiles


Select option 5, Work with Profiles, from the Selection menu to display the Profile
panel:
Select which type of profile you would like to view:
_

1)

Monitoring

Profile - Determines what threads are

cap

2)

Application Profile - Determines what threads will

be

3)

Exception

ex

Profile - Define thread thresholds for

Press Enter/PF3 to continue

Function
Use the panels in the Profile option to set the criteria for what data is collected,
what data is displayed, and what data generates exceptions.

Features
The Profile panel is a menu that provides access to three types of profiles:
v Monitoring
v Application
v Exception

Monitoring Profiles
The Monitoring Profile acts as a filter to determine what activity each monitoring
agent will capture.

Copyright IBM Corp. 2000

39

This is the Monitoring Profiles panel:


CQM$PRFM V1R1
-------- Monitoring Profiles -------Option ==>___________________________________________________Scroll ==> PAGE
------------------------------------------------------------------------Cmd Profile
Description
Last User Upd Timestmp
***************************** Bottom of Data **********************************

Valid Line Commands: (Create, Update, Delete)

Function: The Monitoring Profiles panel allows you to create new monitoring
profiles, and to make changes to existing ones.
Features: Profile data is displayed and can be accessed through line commands.
Data: Data columns on this panel include:
v Profile
v Description
v Last User
v Upd Timestamp
Valid Line Commands: The following line commands are valid on the Monitoring
Profiles panel:
Line Command

Description

CREATE

Type C to create a new profile. The Create Profile panel is


displayed, followed by the Update panel where you finish
creating the new profile.

UPDATE

Type U to update a profile.

DELETE

Type D to delete a profile.

Create Profile: Type C to create a profile. Type the profile name and description
then press Enter. A second window appears where you may select the type of
profile to create (AUTHID, CONNECTN, JOB, PLAN, or SSID). Type C next to the
desired profile type, then press Enter to display the Update Detail window where
you may complete the new profile.

40

DB2 Query Monitor for OS/390: Users Guide

CQM$PRFB V1R1 ---- Create Profile ---Option


===> _____________________________________________________
Profile Name __________
Description _______________________________________
Press Enter/PF3 to create or Can to cancel

Update Profile: Type U to update a profile. At the Update Detail window, you may
change the specifics of the profile. A message is issued after you update the profile
to indicate that it was successfully updated.
CQM$PRFT V1R1 --- Update
--Option ===> __________________________________ Scroll ===> PAGE
Description ________________________________________
Valid Cmds: Create,Update,Delete
------------------------------------------------------------Cmd Type
Inc/Exc Fltr Data QM Pln SQLOrd Interv Host V

***************************** Bottom of Data ****************

Delete: Type D to delete a profile. A message displays that prompts you to confirm
your decision, followed by a second message confirming the deletion was made.

Application Profiles
The Application Profile serves as a filter to determine what data will be displayed on
ISPF, from the data that was collected. This is the default selection from the Work
with Profiles panel.

Chapter 11. Defining Selection Criteria

41

This is the Application Profile panel:


CQM$PRFA V1R1
------- Application Profiles -----Option ===> _____________________________________________ Scroll ===> PAGE
------------------------------------------------------------------------Cmd

Profile

Description

Last User Upd Timestmp

***************************** Bottom of Data **********************************

Valid Line Commands: (Select, Create, Update, Delete)

Function: The Application Profiles panel is where you manage all application
profiles.
Features: You can select, create, update, and delete application profiles from this
panel.
Data: Data columns in this panel include:
v Profile
v Description
v Last User
v Upd Timestamp
Valid Line Commands: The following line commands are valid on the Application
Profiles panel:
Line Command

Description

SELECT

Type S to select an application profile; a message is


displayed indicating if the profile is active.

CREATE

Type C to create a new profile. The Create Profile dialog


box is displayed, as shown below.

UPDATE

Type U to update a current profile. The Update dialog box is


displayed, as shown below.

DELETE

Type D to delete a current profile. A message is displayed


prompting you to confirm your decision, followed by a
second message confirming the deletion.

Create Application Profile: Type C to create an application profile. Type the


application profile name and description then press Enter. A second window
appears where you may provide details about the type of application profile
(AUTHID, CONNECTN, PLAN, or SSID), along with other parameters. Type C next

42

DB2 Query Monitor for OS/390: Users Guide

to the desired profile type, then press Enter to display the Update Detail window
where you may complete the new profile.
CQM$PRFC V1R1 --- Create Profile --Option ===> _________________________________________
Profile Name _____________
Description

___________________________________

Exclude Display of DB2 QM Threads


Display SQL in order of execution
Flag threads active in prev interval
Display value of DB2 Host Variables

(Yes/No)
(Yes/No)
(Yes/No)
(Yes/No)

Press Enter/PF3 to create or CAN to cancel

Update Application Profile: Type U to update an application profile. At the


Update window, you may select which profile type you want to update. Then at the
Update Detail window, you may change the specifics of the application profile. A
message is issued after you update the application profile to indicate that it was
successfully updated.
CQM$PRFU V1R1 --- Update
--Option ===> _____________________________ Scroll ===> PAGE
Description _____________________________________
Exclude Display of DB2 QM Threads
(Yes/No)
Display SQL in order of execution
(Yes/No)
Flag threads active in prev interval
(Yes/No)
Display value of DB2 Host Variables
(Yes/No)
Valid Cmds: Create,Update,Delete
------------------------------------------------------------Cmd Type
Inc/Exc Fltr Data
***************************** Bottom of Data ****************

Exception Profiles
The Exception Profile specifies what threads are within acceptable limits. When a
thread is outside an acceptable limit, an exception is generated and displayed in
red on the screen.
Thresholds can be set on the following items:
v Total SQL Calls
v Total Getpages
v Lock Requests
v Lock Escalations
v CPU Time
v
v
v

Elapsed Time
Application CPU Time
Application Elapsed Time

Chapter 11. Defining Selection Criteria

43

This is the Exception Profiles panel:


CQM$EXCP V1R1
---------- Exception Profiles ---------Option ===> ________________________________________________ Scroll ===> PAGE
------------------------------------------------------------------------Cmd

Profile

Description

Last User Upd Timestmp

***************************** Bottom of Data **********************************

Valid Line Commands: (Create, Update, Delete)

Function: The Exception Profiles panel is where you manage exception profiles.
The Exception Profiles panel displays a list of current profiles to which you can
make changes.
Features: You can create, update and delete exception profiles from this panel.
Data: Data columns in this panel include:
v Profile
v
v
v
v

Description
Last User
Upd
Timestamp

Valid Line Commands: The following line commands are valid for the Exception
Profile panel:

44

DB2 Query Monitor for OS/390: Users Guide

Create: Type C to create a new profile. The Create Profile window is displayed:
CQM$EXCC V1R1 ---- Create Profile ---Option ===> ______________________________________________
Profile Name ______________
Description

_______________________________________

Total SQL Calls


Total Getpages
Lock Request
Lock Escalations
CPU Time
Elapsed Time
Application CPU Time
Application Elapsed Time

____________
____________
____________
____________
__ : __ : __
__ : __ : __
__ : __ : __
__ : __ : __

Press Enter/PF3 to create or CAN to cancel

The Create Profile window is used to create a new exception profile.


Update: Type U to update an exception profile. The Update window is displayed:
CQM$EXCU V1R1 --- Update
--Option ===> ___________________________________________
Profile Name
Description
Total SQL Calls
Total Getpages
Lock Request
Lock Escalations
CPU Time
Elapsed Time
Application CPU Time
Application Elapsed Time

__
__
__
__

:
:
:
:

__
__
__
__

:
:
:
:

__
__
__
__

Press Enter/PF3 to create or CAN to cancel

The Update panel is used to make changes to existing exception profiles.


Delete: Type D to delete an exception profile. A dialog box opens to confirm your
choice, followed by a second dialog box confirming your decision.

Chapter 11. Defining Selection Criteria

45

46

DB2 Query Monitor for OS/390: Users Guide

Chapter 12. Setup


Use this option to identify the DB2 subsystem in which you want to work and the
plan name to which you are binding. This is the S option at the IBM DB2 Query
Monitor Main Menu.
A sample panel is shown below.
--------------------------Enter DB2 System Parameters-------------------------Command ==>
DB2 Tools Load Library
GDG Base Model DSN
DB2 Control Dataset
(Pre-allocated)

==>
==>
==>

Enter DB2 Subsystem Info:


DB2 Subsystem ID

==>

Parameter List Selection ==>

(1-4 Character Subsystem ID)


(Screen # 1-n)

Valid Parameter list selection values are:


1: ZPARM, BSDS, and Load Library Information
2: DB2 Query Monitor Parameters

Use Option #2 from the menu above to work with Query Monitor parameters. The
Update Parameters for DB2 Subsystem panel opens. At this panel you may specify
the plan name to display objects. A sample panel is shown below.

Copyright IBM Corp. 2000

47

------DB2 Query Monitor - Update Parameters for DB2 Subsystem


Command ==>
Enter or Update Specific DB2 Parameters :
Plan #1 Name

48

DB2 Query Monitor for OS/390: Users Guide

==>

Chapter 13. Common Tasks


The following summarizes how to execute common IBM DB2 Query Monitor tasks:
Task

Instructions

Display Thread Activity

From the main panel, type 1 to select View Current Activity. The Thread
Activity panel is displayed.

Display Plan Activity

From the Thread Detail or the Interval Thread Detail panel, type S on the
CMD line. The Plan Detail panel is displayed.

Display DBRM Package Activity

From the Plan Detail panel, type S on the CMD line. The DBRM Detail
panel is displayed.

Display SQL Instruction Text

From the DBRM Detail panel, type S on the CMD line. The SQL Instruction
Text panel is displayed.

Display Bufferpool Statistics

From the main panel, type 1 to select View Current Activity, then type B for
Buffer. The Thread Bufferpool Statistics panel is displayed.

Display SQL Instruction Totals

From the main panel, type 1 to select View Current Activity, then type I for
Instruction counts. The SQL Instruction Counts panel displayed.

Display Lock Event Totals

From the main panel, type 1 to select View Current Activity, then type L for
Locks. The Thread Locking Events panel is displayed.

Display Accounting Class III Data

From the Thread Activity or the Interval Thread Activity panel, type D. The
Thread Delays panel is displayed.

Copyright IBM Corp. 2000

49

50

DB2 Query Monitor for OS/390: Users Guide

Chapter 14. DB2/QM Memory Usage Statistics


DB2/QM records data about SQL activity for the current interval in a set of
dataspaces. Each dataspace contains a specific control block type. During an active
interval, DB2/QM fetches control blocks from the dataspace control block pools as
required. At the end of the interval processing DB2/QM returns the control segment
to the dataspace pools. DB2/QM subdivides these dataspaces into one megabyte
segments. Each segment contains a number of control blocks. This number varies
depending on the size of the control blocks.

Displaying Activity
To display activity within the DB2/QM dataspace pools, enter the DISPLAY
DATASPACES command.
Refer to Chapter 15, DB2 Query Monitor Operator Commands, for more
information about the DISPLAY DATASPACES command.

Syntax
F db2qmtask,DISPLAY DATASPACES

Output
CQM3240I
CQM3241I
CQM3242I
CQM3243I
CQM3244I
CQM3245I
CQM3241I
CQM3242I
CQM3243I
CQM3244I
CQM3245I
CQM3241I
CQM3242I
CQM3243I
CQM3244I
CQM3245I
CQM3241I
CQM3242I
CQM3243I
CQM3244I
CQM3245I

DB2 QM DATASPACE UDAGE DISPLAY:


PLAN DATASPACE:
NODE SIZE
5,968
TOTAL NODES
358,225
AVAILABLE NODES
358,224
PERCENT UTILIZED
0.00%
DBRM DATASPACE
NODE SIZE
580
TOTAL NODES
3,698,929
AVAILABLE NODES
3,698,911
PERCENT UTILIZED
0.00%
SQL DATASPACE:
NODE SIZE
96
TOTAL NODES
22,335,490
AVAILABLE NODES
22,335,373
PERCENT UTILIZED
0.00%
HOSTV DATASPACE:
NODE SIZE
96
TOTAL NODES
22,335,490
AVAILABLE NODES
22,335,490
PERCENT UTILIZED
0.00%

To determine space usage in a particular pool, subtract the available nodes from
the total nodes, and then multiply by the node size. This will determine the amount
of storage in use for control blocks in the given pool.
For example, in the above output the amount of space used by the SQL dataspace
would be 11,232 bytes.1
(22,335,490 - 22,335,373) * 96 = 11,232
Copyright IBM Corp. 2000

51

____________________________________
1

The actual space used may be anywhere from 11,232 bytes to one megabyte
because DB2/QM frees storage on a segment boundary.

52

DB2 Query Monitor for OS/390: Users Guide

Chapter 15. DB2 Query Monitor Operator Commands


Via the MVS MODIFY command, an operator may communicate directly with the
DB2/QM task to display or control its operation. For more information on this
command, see the OS/390 System Commands Manual.

Valid Commands
The valid DB2/QM operator commands are listed below.

DISPLAY DATASPACES
The DISPLAY DATASPACES command displays statistics related to DB2/QMs
dataspace usage. For more information on this command, see Chapter 14,
DB2/QM Memory Usage Statistics.

INTERVAL
Use the INTERVAL command to dynamically invoke DB2/QMs interval processor.
During normal operation, DB2/QM creates interval data when a recording interval
expires or during DB2/QM shutdown.

Copyright IBM Corp. 2000

53

54

DB2 Query Monitor for OS/390: Users Guide

Appendix. Notices
This information was developed for products and services offered in the U.S.A. IBM
may not offer the products, services, or features discussed in this document in other
countries. Consult your local IBM representative for information on the products and
services currently available in your area. Any reference to an IBM product, program,
or service is not intended to state or imply that only that IBM product, program, or
service may be used. Any functionally equivalent product, program, or service that
does not infringe any IBM intellectual property right may be used instead. However,
it is the users responsibility to evaluate and verify the operation of any non-IBM
product, program, or service.
IBM may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not give you any
license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive
Armonk, NY 10594-1785
U.S.A.
For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
IBM World Trade Asia Corporation
Licensing
2-31 Roppongi 3-chome, Minato-ku
Tokyo 106, Japan
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE. Some states do not allow disclaimer of express or
implied warranties in certain transactions, therefore, this statement may not apply to
you.
This information could include technical inaccuracies or typographical errors.
Changes are periodically made to the information herein; these changes will be
incorporated in new editions of the publication. IBM may make improvements and/or
changes in the product(s) and/or the program(s) described in this publication at any
time without notice.
Any references in this publication to non-IBM Web sites are provided for
convenience only and do not in any manner serve as an endorsement of those
Web sites. The materials at those Web sites are not part of the materials for this
IBM product and use of those Web sites is as your own risk.
Licensees of this program who wish to have information about it for the purpose of
enabling: (i) the exchange of information between independently created programs
and other programs (including this one) and (ii) the mutual use of the information
which has been exchanged, should contact:

Copyright IBM Corp. 2000

55

IBM Corporation
J74/G4
555 Bailey Avenue
P.O. Box 49023
San Jose, CA 95161-9023
U.S.A.
Such information may be available, subject to appropriate terms and conditions,
including in some cases, payment of a fee.
The licensed program described in this information and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Program License Agreement, or any equivalent agreement
between us.
Any performance data contained herein was determined in a controlled
environment. Therefore, the results obtained in other operating environments may
vary significantly. Some measurements may have been made on development-level
systems and there is no guarantee that these measurements will be the same on
generally available systems. Furthermore, some measurement may have been
estimated through extrapolation. Actual results may vary. Users of this document
should verify the applicable data for their specific environment.
Information concerning non-IBM products was obtained from the suppliers of those
products, their published announcements or other publicly available sources. IBM
has not tested those products and cannot confirm the accuracy of performance,
compatibility or any other claims related to non-IBM products. Questions on the
capabilities of non-IBM products should be addressed to the suppliers of those
products.
All statements regarding IBMs future direction or intent are subject to change or
withdrawal without notice, and represent goals and objectives only.
All IBM prices shown are IBMs suggested retail prices, are current and are subject
to change without notice. Dealer prices may vary.
This information is for planning purposes only. The information herein is subject to
change before the products described become available.
This information contains examples of data and reports used in daily business
operations. To illustrate them as completely as possible, the examples include the
names of individuals, companies, brands, and products. All of these names are
fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which
illustrates programming techniques on various operating platforms. You may copy,
modify, and distribute these sample programs in any form without payment to IBM,
for the purposes of developing, using, marketing or distributing application programs
conforming to the application programming interface for the operating platform for
which the sample programs are written. These examples have not been thoroughly
tested under all conditions. IBM, therefore, cannot guarantee or imply reliability,
serviceability, or function of these programs.

56

DB2 Query Monitor for OS/390: Users Guide

If you are viewing this information softcopy, the photographs and color illustrations
may not appear.

Trademarks
The following terms are trademarks of the IBM Corporation in the United States or
other countries or both:
Advanced Peer-to-Peer
Networking
AIX
AIX/6000
CICS
CICS/MVS
CICS/VSE
DATABASE 2
DB2
Distributed Relational
Database Architecture
DRDA
DXT

GDDM
IBM
MVS/ESA
MVS/XA
OfficeVision/VM
OS/2
PL/I
PROFS
QMF
SQL/DS
Virtual Machine/Enterprise
Systems Architecture
VM/XA
VSE/ESA

Other company, product, and service names, which may be denoted by a double
asterisk (**), may be trademarks or service marks of others.

Appendix. Notices

57

58

DB2 Query Monitor for OS/390: Users Guide

Readers Comments Wed Like to Hear from You


DB2 Query Monitor for OS/390
Users Guide
Version 1 Release 1
Publication No. SC27-0968-00
Overall, how satisfied are you with the information in this book?

Overall satisfaction

Very Satisfied
h

Satisfied
h

Neutral
h

Dissatisfied
h

Very Dissatisfied
h

Neutral
h
h
h
h
h
h

Dissatisfied
h
h
h
h
h
h

Very Dissatisfied
h
h
h
h
h
h

How satisfied are you that the information in this book is:

Accurate
Complete
Easy to find
Easy to understand
Well organized
Applicable to your tasks

Very Satisfied
h
h
h
h
h
h

Satisfied
h
h
h
h
h
h

Please tell us how we can improve this book:

Thank you for your responses. May we contact you?

h Yes

h No

When you send comments to IBM, you grant IBM a nonexclusive right to use or distribute your comments in any
way it believes appropriate without incurring any obligation to you.

Name
Company or Organization
Phone No.

Address

SC27-0968-00



___________________________________________________________________________________________________

Readers Comments Wed Like to Hear from You

Cut or Fold
Along Line

_ _ _ _ _ _ _Fold
_ _ _and
_ _ _Tape
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _Please
_ _ _ _ _do
_ _not
_ _ staple
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _Fold
_ _ _and
_ _ Tape
______
NO POSTAGE
NECESSARY
IF MAILED IN THE
UNITED STATES

BUSINESS REPLY MAIL


FIRST-CLASS MAIL PERMIT NO. 40 ARMONK, NEW YORK
POSTAGE WILL BE PAID BY ADDRESSEE

IBM CORPORATION
Department BWE/H3
P.O. Box 49023
San Jose, CA 95161-9023
U.S.A.

_________________________________________________________________________________________
Fold and Tape
Please do not staple
Fold and Tape

SC27-0968-00

Cut or Fold
Along Line



File Number:
Program Number: 5675E67

Printed in the United States of America


on recycled paper containing 10%
recovered post-consumer fiber.

SC27-0968-00

Das könnte Ihnen auch gefallen