Capturing SQL statements from catalog plans or packages

Use the Capture SQL from Catalog Plan or Package page to find and select an SQL statement from static SQL statements that are bound in a plan or package and stored in the DB2® catalog.

Before you begin

Procedure

To capture an SQL statement from a plan or package:

  1. In the Data Source Explorer, right-click the database on which the catalog is located.
  2. Select Query Tuner > Start Tuning. The workflow assistant for query tuning opens to the Capture section.
  3. On the left side of the editor, select Catalog Plan or Package under DB2 for z/OS Sources.
  4. Create a filter, or select an existing one, that sets criteria for how to find the SQL statement that you want.
  5. 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.
  6. 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 All Single-Query Advisors and Analysis Tools page of the Invoke section. The statement appears in the Query Text field.

    For help on the Run All Single-Query Advisors and Analysis Tools page, click the Help 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.


Feedback