Creating an SQL Viewer


You can create multiple SQL Viewers to monitor different SQL activity. Collecting large volumes of SQL data can result in degraded performance. Therefore, a maximum of 1,000 SQL statements are collected per viewer. After reviewing collected information, you should delete the viewer. If you want to retain the information for further analysis, you can save the data to a file.

Warning

Note

For DB2 UDB version 9.7, a Configure Default Account user must have the DBADM authority to create an SQL Viewer. You can grant this authority to the user by using the following DB2 command: db2 grant DBADM on database to user userName

To create an SQL Viewer

  1. Right-click on the SQL_VIEWER icon and select Create SQL Viewer.
  2. In the Viewer Name box, enter a name for the SQL Viewer. The name must be no more than 18 characters and cannot be the same as a DB2 event.
  3. (Optional) If you want to monitor SQL for a single user, type a user name in the Authorization Id box.
     Skip to step 5 if you are not using the KM on a UNIX platform.
  4. (Optional) If you want to monitor SQL for a single application, type an application name in the Application Name box.
  5. Click OK.
  6. Double-click the SQL_VIEWER icon to view the new SQL Viewer instance icon.

Where to go from here

For more information about SQL Viewers, see the following tasks:The [confluence_table-plus] macro is a standalone macro and it cannot be used inline.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC PATROL for DB2 Universal Database 9.0