Creating query workloads from SQL statements that are in DB2 Query Monitor for z/OS
You can create query workloads from SQL statements that
were offloaded from DB2® Query
Monitor for z/OS® into DB2 tables.
Before you begin
Ensure that the SQL statements that you want
to capture are offloaded from DB2 Query
Monitor for z/OS into DB2 tables in the connected DB2 subsystem. For information about
offloading data from DB2 Query
Monitor for z/OS, see Loading Query Monitor data to DB2.
Ensure
that the DB2 Query Monitor for z/OS tables have their default
names.
Ensure that your
authorization ID has the SELECT privilege on the SYSIBM.SYSPACKSTMT
table and the DB2 Query Monitor
for z/OS tables.
In the Data Source Explorer, connect to the DB2 subsystem, if the connection
is not already open. DB2 Query
Monitor for z/OS must be installed
on this subsystem.
In the Data Source Explorer, right-click the DB2 subsystem
and select Query Tuner > Start Tuning.
About this task
You can capture these
types of SQL statements:
DECLARE
DELETE
INSERT
INSERT INTO
MERGE
SELECT
UPDATE
VALUES
WITH
Procedure
To create a query workload from SQL statements in DB2 Query Monitor for z/OS:
On the left side of the workflow assistant,
select Query Monitor under DB2 for
z/OS Sources. The Capture SQL from DB2 Query Monitor for z/OS page
opens. If you need help with
a section of this page, click the button for that section.
Create a filter, or
select an existing filter, that sets criteria for how to find the
SQL statements that you want to tune.
Click Capture.
Right-click in the
table in the Captured Statements section and
select Save All Statements as a Workload.
Results
The workflow assistant
for query tuning creates the query workload and lists it on the Manage
and Tune Workloads page of the Manage section.