In the Data Source Explorer, connect to the
DB2 database, if the connection is not already open.
Procedure
To capture an SQL statement from an SQL procedure:
In the Data Source Explorer, expand the database on which
the SQL procedure is located until you find that SQL procedure.
Right-click the SQL procedure and select Query Tuner > Start Tuning. The workflow assistant for query tuning
opens to the Run Single-Query Advisors and Analysis Tools page
of the Invoke section. The SELECT statement
appears in the Query Text section.
What to do next
Run the analysis tools and the advisors.
For help,
click
the button at the top of the page. You can also press F1.