Viewing SQL activity for a selected summary
When you view activity summaries in Db2 Query Monitor, you can view the SQL activity for the activity level of interest, such as a specific plan, Db2 subsystem, or program.
Procedure
To view SQL activity for a selected summary:
- On the IBM DB2 Query Monitor for z/OS panel (the main menu), specify option 1, and press Enter.
- On the Select Summary Level panel, specify the level at which you want to summarize activity information, and press Enter.
-
On the Operational Summaries
panel or the Structural Summaries
panel, specify the S line command
next to the activity level of interest for which you want to view SQL activity.
The Activity by SQL Text panel is displayed:
Figure 1. Activity by SQL Text panel YYYY/MM/DD HH:MM:SS ---- Activity by SQL Text ---- Row 1 of 6 Option ===> Scroll ===> PAGE QM Subsystem : QM01 Interval Start Date: MM/DD/YYYY Time: HH:MM:SS Filters Enabled : N Interval End Date: CURRENT Time: CURRENT NAVI: Plan:PLAN0123 CMD - Enter "/" to select action --------------------------------------------------------------------------- > CMD SQL Text Exec Count Calls -- ---------------------------------------- -------------- -------------- __ SELECT MIN(E.SALARY) FROM GLWTEMP E, GLW 12 12 __ SELECT MIN(E.SALARY) FROM GLWTEMP E, GLW 1 5 __ SELECT MAX(EMPTIME) FROM GLWTEPA 17 17 __ SELECT MAX(EMPTIME) FROM GLWTEPA 1 5 __ SELECT MAX(E.SALARY), MAX(D.EMPLOYEE_CNT 29 29 __ SELECT MAX(E.SALARY), MAX(D.EMPLOYEE_CNT 1 5 ***************************** Bottom of Data **********************************
For rows that display dynamic SQL, the Db2, Plan, Program, and Section number columns are blank.
- Optional:
To view the complete SQL text for a specific row, use the V or VF line command.
Tip:
On the resulting Display SQL Statement Text panel, you can use the VIEW command to open an ISPF VIEW session where you can edit and save the SQL text. See Viewing SQL text.