1 | Qualified job name | Input | Char(26) |
2 | Memory handle | Input | Char(10) |
3 | Storage size | Input | Binary(4) |
4 | Free storage method | Input | Char(10) |
5 | Number of types to monitor | Input | Binary(4) |
6 | Subtypes to monitor | Input | Array(*) of Char(10) |
7 | Error code | I/O | Char(*) |
The Start SQL Database Monitor (QQQSSDBM) API starts the memory-based SQL database monitor. Associated APIs include the following:
The job to be monitored. The qualified job name has three parts:
Job name | CHAR(10). A specific job name, a generic name, or
one of the following special values:
|
||||
User name | CHAR(10). A specific user profile name. | ||||
Job number | CHAR(6). A specific job number. |
The handle used for consolidating data. This parameter is only valid when the qualified job name parameter is not *ALL (that is, you are starting the monitor on a specific job). If multiple jobs are monitoring with the same memory handle, their database activity will be consolidated together.
If *JOB is specified, the job's database activity will be monitored in its own memory area (the activity will not be consolidated with any other job's database activity, unless the other job explicitly specifies this job's job number as the memory handle.). For example, assume QQQSSDBM is issued by job 111111 with a memory handle of *JOB. This implies a memory handle of 111111 is used. If job 999999 issues QQQSSDBM and names a memory handle of 111111, then both jobs 111111 and 999999 will use memory area 111111. Consequently, the database monitor data for both jobs will be summarized within this memory area.
The possible values are:
User defined | Up to 6-character value to name a memory area that will contain consolidated data. Only the first 6 characters will be used for a named memory. |
*JOB | Use the memory area associated with the job, and do not consolidate data with any other job. |
The maximum amount of storage to use for in-memory data (specified in megabytes). A value of -1 implies no maximum.
When maximum storage is reached in the storage size parameter, the method used to free storage. The possible value is:
*LRU | Free the statement least recently used |
The number of types passed in the subtypes to monitor array.
The list of all subtypes that should be monitored. The possible values are:
KEYT_3000 | Summary: Arrival sequence (file QAQQ3000) |
KEYT_3001 | Summary: Index used (file QAQQ3001) |
KEYT_3002 | Summary: Index created (file QAQQ3002) |
KEYT_3003 | Summary: Sort (file QAQQ3003) |
KEYT_3004 | Summary: Temporary file (file QAQQ3004) |
KEYT_3007 | Summary: Optimizer time-out or all access paths considered (file QAQQ3007) |
KEYT_3008 | Summary: Subselect processing (file QAQQ3008) |
KEYT_3010 | Summary: Host variable values (file QAQQ3010) |
KEYT_3030 | Summary: Materialized query tables considered (file QAQQ3030) |
KEYT_TEXT | SQL statement text (file QAQQTEXT) |
KEYT_QRYI | Summary: General SQL information including statement count, maximum runtime, time last used, and so forth. This subtype is always monitored because it is required for monitoring all other subtypes (file QAQQQRYI). It should still be specified, and is required if it is the only subtype to be monitored. |
*EDSQL | Monitor all subtypes. If this option is specified, the number of types to monitor should be set to 1, and no other subtypes should be requested. |
The structure in which to return error information. For the format of the structure, see Error Code Parameter.
This function is threadsafe but not thread enabled. Database monitor data is collected in the threaded process but summarized at the job level.
Message ID | Error Message Text |
---|---|
CPD0172 D | Parameters passed on CALL do not match those required. |
CPF1321 E | Job &1 user &2 job number &3 not found. |
CPF222E E | &1 special authority is required. |
CPF3CF1 E | Error code parameter not valid. |
CPF436C E | Job specified is already being monitored. |
CPF436E E | Job &1 user &2 job number &3 is not active. |
Top | Database and File APIs | APIs by category |