Capturing SQL statements from exported workloads

If you are using DB2® for z/OS®, you can capture SQL statements that are in a query workload that was authored directly in an XML file.

Before you begin

About this task

IBM® DB2 Query Monitor for z/OS can export an XML file that defines a query workload that you can capture SQL statements from.

You can also define a query workload by authoring an XML file that uses the Optim™ Query Workload Tuner XML schema. Then, you can use the Capture SQL from Exported Workload page to capture the SQL statements from the XML file.

Procedure

To capture SQL statements from an XML file that defines a query workload:

  1. In the Data Source Explorer, right-click the database or subsystem and select Query Tuner > Start Tuning. The Capture section of the workflow assistant for query tuning opens.
  2. Under Text Sources, select Exported Workload. The Capture SQL from Exported Workload page opens.
  3. On the Capture SQL from Exported Workload page, browse to the XML file.
  4. Click Capture.
  5. 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. For help with this page, click the Help icon (Help), or click in a portion of the page and type F1.

Feedback