Viewing Db2 command activity
Follow these steps to view Db2 command activity.
About this task
Db2 Query Monitor does not track Db2 commands that have not been executed (for example, syntax errors, bad return codes).
Procedure
-
On the DB2 Query Monitor main menu, type 4 in the
Option field and press Enter.
The DB2 Command Activity panel is displayed:
Figure 1. DB2 Command Activity panel YYYY/MM/DD HH:MM:SS ------- DB2 Command Activity ------- Row 1 of 5 Option ===> Scroll ===> PAGE QM Subsystem : QM01 Interval Start Date: MM/DD/YYYY Time: HH:MM:SS Filters Enabled : N Interval End Date: MM/DD/YYYY Time: HH:MM:SS ------------------------------------------------------------------------ > SSID JOBNAME AUTHID Command Timestamp Command Text ---- -------- -------- --------------------- --------------------------------- SS01 JOBNM1 USERID MM/DD/YYYY - 2:13:49 -DISPLAY DATABASE(*) SS01 JOBNM1 USERID MM/DD/YYYY - 2:33:34 -DISPLAY DATABASE(*) SS01 JOBNM1 USERID MM/DD/YYYY - 3:01:22 -DISPLAY DATABASE(*) SS01 JOBNM1 USERID MM/DD/YYYY - 3:12:27 -DISPLAY DATABASE(*) SS01 JOBNM1 USERID MM/DD/YYYY - 3:21:11 -DISPLAY DATABASE(*) ***************************** Bottom of Data **********************************
The following options are available:
- SSID
- The Db2 subsystem on which the activity occurred.
-
- Offload table name
- CQM_DB2_COMMDANDS
- Column name
- DB2_SUBSYSTEM
- Jobname
- The name of the job.
-
- Offload table name
- CQM_DB2_COMMDANDS
- Column name
- JOBNAME
- Authid
- The primary authorization ID.
-
- Offload table name
- CQM_DB2_COMMDANDS
- Column name
- AUTHID
- Command Timestamp
- The date and time that Query Monitor recorded the execution of a given Db2 command.
-
- Offload table name
- CQM_DB2_COMMDANDS
- Column name
- COMMAND_TIMESTAMP
- Command Text
- The text of the Db2 command.
-
- Offload table name
- CQM_DB2_COMMDANDS
- Column name
- COMMAND_TEXT
- When finished viewing DB2 command activity, press PF3 to return to the Db2 Query Monitor Main Menu.