Running the SQL Snapshot facility
Use this task to capture the dynamic SQL activity of a DB2 application. Before you start, ensure that the STATEMENT monitor switch is set to ON. See Controlling parameter activity with DB2 Monitor switches for more information.
To capture the dynamic SQL activity of a DB2 application
- In the DB2 instance window, double-click the DB2_APP (DB2EEE_APP in the DB2 UDB EEE) icon and right-click the DB2 application icon for which you want to view SQL information.
- select one of the following commands:
- SQL Snapshot > SQL Information
Choosing this command provides a report of SQL Snapshot information for all agents under this application. If no SQL statement was captured, you receive a message stating that the information is not available. SQL Snapshot > SQL Explain
Choosing this command opens the Explain SQL Statement Editor so that you can change the SQL text. You also have the option to set the schema name for unqualified database objects in your SQL. If you have created Explain tables, click Explain to execute DB2 Explain against the SQL statement. A report with Explain information will be displayed using db2exfmt. If no SQL statement was captured, you receive a message stating that the information is not available.
- SQL Snapshot > SQL Information
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*