Limited support BMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see BMC AMI Command Center for Db2 13.2

Troubleshooting SQL statements


You can troubleshoot SQL statements for Db2 errors and performance problems. Use the SQL Errors app to identify SQL statements that are generating SQL errors. Use the SQL Analysis app to identify SQL statements with performance problems. 

Related topics

Overview of the SQL Errors app

The SQL Errors application displays SQL errors captured by BMC AMI Apptune for Db2. You can view a list of errors generated on one or more subsystems. You can also drill down to identify the programs and statements that are causing the errors.

The following table lists the actions that you can perform in the SQL Errors app:

Purpose

Action

Change the time interval

Select the time interval from the Timeframe list.

Change the subsystems displayed

(SPE2104)

  1. Click Options NW_gear.png.
  2. Select the Subsystems that you need to investigate.
  3. Click OK.

Refresh the data displayed

Click refresh_app-24.png.

View errors for a subsystem

Perform one of the following actions:


    • Click the bar for a subsystem on the bar graph.
    • Double-click a row on the list of subsystems.

Adjust the time interval for the errors displayed

Select the time interval from the Timeframe list.

Filter the rows displayed by:

  • Plan
  • Program
  • User Name
  • Client Application (SPE2010)

Click Filter_app_Contents-24.png.

Return to the previous view

Click back_icon_app-24.png.

View a list of occurrences of an error code

Perform one of the following actions:

  • Select the error from the Occurrences for Error Code list.
  • Click the section of the pie graph that represents the error code.

View the details for an occurrence of an error code

Double-click a row on the list of occurrences.

Suppress the display of the Options dialog box

(SPE2104)

  1. Click Options NW_gear.png.
  2. Clear Always shows this panel on startup.
  3. Click OK.

Open the SQL Analysis app

Click SQL_analysis_app-24.png


Overview of the SQL Analysis app

The SQL Analysis application displays a list of the top 100 SQL statements with the highest CPU time for a given subsystem and time period. You can also view the details for a statement.

The following table lists the actions that you can perform in the SQL Analysis app:

Purpose

Action

Choose subsystem

Select the subsystem from the Subsystems list.

Refresh the data displayed

Click refresh_app-24.png.

View details for an SQL statement

Double-click a row on the list of SQL statements.

Adjust the time interval for the SQL statements displayed

Select an interval from the Timeframe list.

Filter the rows displayed by:

Click Filter_app_Contents-24.png.

Export the list of SQL statements currently displayed

(BMC.DB2.SPE2210)

  1. Click Generate Report
  2. Select one of the following options:

    • CSV - With SQL text preview 
    • CSV - With full SQL text
    • PDF

    Based on your browser settings, after Command Center generates the report, either the Save As dialog is displayed or the browser saves the file automatically.

  3. Enter a name for the report
  4. Click Save

Return to the previous view

Click back_icon_app-24.png.

Suppress the display of the Options dialog box

(SPE2104)

  1. Click Options NW_gear.png.
  2. Clear Always show this panel on startup.
  3. Click OK.

Open the SQL Errors app

Click SQL_errors_app-24.png.

This section provides more information about the following topics:

 

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