Query Monitor subsystem
The Query Monitor subsystem is a component of Db2 Query Monitor that integrates the data collected by the CQC to provide a complete picture of query activity in a monitored Db2 subsystem.
A Query Monitor subsystem can run as either a started task or as a batch job under the control of JES. To run the Query Monitor subsystem as a started task, the started task JCL must reside in a cataloged procedure library. You can customize the started task JCL, CQMPROC, for a specific installation of Db2 either using Tools Customizer or by customizing SCQMSAMP data set member CQMPROC.
The Query Monitor subsystem contains a CQMPARMS DD statement that points to the Db2 Query Monitor control data set that in turn contains Db2 Query Monitor parameter file, CQMPARMS. CQMPARMS defines the Query Monitor subsystem ID (QMID) that identifies the Query Monitor subsystem. You can customize CQMPARMS for a specific installation of Db2 Query Monitor either using Tools Customizer or by customizing SCQMSAMP data set member CQMPARMS.
Query Monitor subsystem data collection
The Query Monitor subsystem collects data, manages intervals, archives historical data, and installs/removes the required instrumentation components. Data collection consists of the following components:
- Address space initialization
- Control block allocation
- Address space termination and cleanup
- Db2 discovery
- Instrumentation install and uninstall
- First-level data summarization
- Performance history file population and management
- Exception recognition and notification
- SQL alert recognition and notification
- Field diagnostic generation
- Interval processing
- Historical data archival
- Historical data archive history maintenance
Monitoring more than one Db2 subsystem
A Query Monitor subsystem can monitor one to 64 Db2 subsystems on an LPAR. A minimal implementation consists of one Query Monitor subsystem per LPAR. An extremely granular implementation uses one Query Monitor subsystem to monitor each Db2 subsystem.
If you use several Db2 Data Access Common Collector products (CQM or FINDME ADH) or several instances of the same product to monitor more than one Db2 subsystem on the same LPAR, each product (or instance of a product) can have a different value for the MASTER_PROCNAME parameter. This configuration is appropriate when running code at different maintenance levels on the same LPAR (for example, if you are testing new maintenance prior to upgrading your production system).
Running multiple Query Monitor subsystems
Multiple Query Monitor subsystem can run concurrently on a single z/OS® image if each Query Monitor subsystem monitors a different Db2 subsystem.
Two Query Monitor subsystem cannot monitor the same Db2 subsystem.
Each Query Monitor subsystem must have a unique ID and started task JCL associated with it. The started task JCL must point to:
- The Db2 control file. DB2PARMS defines the connections to Db2. There should be only one Db2 control file for your enterprise, if possible.
- The Db2 Query Monitor parameter file. You must use a unique CQMPARMS file for each Query Monitor subsystem.
- The Db2 Query Monitor interval data set. You must use a unique CQMINTER data set for each Query Monitor subsystem.
- The Db2 Query Monitor monitoring profile data set. In most situations, is preferable that you use a single CQMPROFS data set for all Query Monitor subsystems. In certain situations, multiple CQMPROFS data sets are used, for example, if you have one CQMPROFS for DEV and another for PROD.
Monitoring the same Db2 subsystem with multiple Db2 Data Access Common Collector products
If you use multiple Db2 Data Access Common Collector products (CQM or FINDME ADH) to monitor the same Db2 subsystem, each product must specify the same value for the MASTER_PROCNAME parameter.