Capturing SQL statements from triggers, SQL user-defined functions, and views that are on DB2 for z/OS

Use the Data Source Explorer to capture SQL statements that are in triggers or SQL user-defined functions. You can also use the Data Source Explorer to capture SELECT statements for retrieving records from views.

Before you begin

Procedure

To capture an SQL statement from a trigger, SQL user-defined function, or view:

  1. In the Data Source Explorer, expand the database on which the trigger, user-defined function, or view is located until you find the object that you want to capture an SQL statement from.
  2. Right-click the object and select Query Tuner > Start Tuning. A new instance of the workflow assistant for query tuning opens to the Run All Single-Query Advisors and Analysis Tools page of the Invoke section.

What to do next

Now that the workflow assistant for query tuning has the SQL statement, you can use the features on the Run All Single-Query Advisors and Analysis Tools page to generate analyses of and recommendations for tuning the statement.


Feedback