Use the Capture SQL from DB2 Query Monitor for
z/OS page to find and select an SQL statement to tune from SQL statements that were offloaded
from DB2® Query Monitor for z/OS® into DB2 tables.
About this task
You can capture these
types of SQL statements:
- DECLARE
- DELETE
- INSERT
- INSERT INTO
- MERGE
- SELECT
- UPDATE
- VALUES
- WITH
Procedure
To capture an SQL statement from DB2 Query Monitor for z/OS:
- In the Data Source
Explorer, right-click the subsystem
on which the DB2 Query Monitor
for z/OS is located.
- Select . The
workflow assistant for query tuning opens to the Capture section.
- On the left side of the workflow assistant,
select Query Monitor under DB2 for
z/OS Sources.
- Create a filter, or select an existing one, that sets criteria
for how to find the SQL statement that you want.
- Click Capture. After
you capture SQL statements that match the criteria, the Captured
Statements section opens. The captured SQL statements
appear in a table in this section. You can sort the statements by
clicking the column headers in the table.
- Right-click the statement
that you want to analyze and tune, and select Invoke Advisors
and Tools.
The workflow assistant
for query tuning opens to the Run Single-Query Advisors
and Analysis Tools page of the Invoke section.
The statement appears in the Query Text field.
What to do next
Run
advisors and tools on the statement. For help on the Run
Single-Query Advisors and Analysis Tools page, click the
button
at the top of the page or in the two sections. You can also click
at the top of the page or in a section and then press F1.