Identifying errors generated by SQL statements


The SQL Errors app displays a summary of the number of errors encountered by subsystem. The app defaults to displaying a summary of errors based on the selections in the Options dialog box for the app. The SQL Errors app displays the following views:

  • Errors by Subsystem summary 
  • Subsystem detail
  • Statement detail

The view displayed depends on the number of Db2 subsystems selected on the Options dialog box. For a single subsystem, the subsystem detail view displays. For multiple subsystems, the errors by subsystem summary view displays.

By default, the Command Center displays the Options dialog box when you open the SQL Errors app. You can suppress the dialog's display by clearing Always show this panel on startup in the Options dialog box.

BMC AMI Command Center supports BMC AMI Apptune for Db2 Advanced and Standard monitoring modes. When Apptune is in Standard monitoring mode, a value of N/A or -1 is displayed for metrics that are not recorded.

Use the following procedure to view a report of the errors generated by SQL statements for each subsystem selected.

To identify errors generated by SQL statements

  1. In the upper left corner of the New console, click Apps.
  2. Click SQL Errors NG_sql_exclamation_triangle_red.png.
    The Options dialog box of the SQL Errors application is displayed.
  3. In the Options dialog box, perform the following actions:
    1. Select the Subsystems that you need to investigate.
    2. Select the Timeframe in which you want to view SQL Errors from the following options:

      Option

      Description

      Default Interval

      If you selected a single subsystem, the default interval start and end times are determined by the current APPTUNE interval. If you selected more than one subsystem, the default interval starts at the earliest interval among all active Db2 subsystems defined to the chosen data collector. It ends at the current date and time.

      Last Hour

      The results include errors in all APPTUNE intervals within the last hour, based on the server’s time zone.

      Last 24 Hours

      The results include errors in all APPTUNE intervals within the last 24 hours, based on the server's time zone.

      Today

      The results include errors in all APPTUNE intervals since midnight, based on the server's time zone.

      Yesterday

       

      The results include errors in all APPTUNE intervals within the 24 hours before midnight, based on the server's time zone.

    3. Click OK.
      The view displayed depends on the number of subsystems selected. If you selected a single subsystem, the subsystem detail view is displayed (continue with step 6). If you selected multiple subsystems, the errors by subsystem summary view is displayed.
  4. From the Timeframe list, select an interval to adjust the time frame in which you are investigating errors. If you select Custom Interval, the Time Intervals dialog box is displayed. For more information, see Selecting the time interval for SQL apps.
  5. Open the subsystem detail view by:

    • Clicking the subsystem's bar on the bar chart. If you select a data-sharing group, the app displays errors for all subsystems in that group.
    • Double-clicking the subsystem's row on the grid. If you select a subsystem in a data-sharing group, the app displays errors for that subsystem.
    • Selecting the subsystem's row on the grid and clicking Details. If you select a subsystem in a data-sharing group, the app displays errors for that subsystem.

    The subsystem detail view is displayed. This view includes a pie chart showing the proportions of all SQL errors found in the subsystem. This view also consists of a grid, below the pie chart, that shows the occurrences for an error number. The grid defaults to the first error found in ascending order.

  6. Select the error number that you are investigating from the Occurrences for Error Code list. Alternatively, you can select the error number by clicking on the appropriate section of the pie chart.
    To view a list of occurrences of all error codes, select All from the Occurrences for Error Code list.
  7. (BMC.DB2.SPE2601) To view the error counts for the pie chart, click Show tabular form Table image.
    The Error Count table is displayed with the following columns:

    • Error Code is the SQL error code.
    • Detail Reports Count is the number of times the details (timestamp, plan, program, and so on) for that error were recorded.
    • Error Count is the number of times an error was observed.
  8. (BMC.DB2.SPE2601) To export the data on the Error Count table, perform the following actions:
    1. Select one or more rows from the table. To select all the rows, from the context menu, select Select all.
    2. From the context menu, select Export data.
    3. If prompted, select a location for the exported data.
      The default file name is export_data.csv.
    4. Save the file.
  9. From the Timeframe list, select an interval to adjust the time frame in which you are investigating errors. If you select Custom Interval, the Time Intervals dialog box is displayed. For more information, see Selecting the time interval for SQL apps.
  10. Click Filter Filter_app_Contents-24.png to restrict the results displayed based on one or more of the following fields:

    • Plan
    • Program
    • User Name
    • Client Application

    If you add a filter, BMC AMI Command Center displays NG_FiltersApplied.png next to the title of the results pane and changes the color of the filter icon (NG_filter_o_red.png). 
    For more information, see Filtering the result set for an SQL app.
    To clear the filters, click Clear all filters NG_ClearAllFilters.png.

  11. (Optional) Click Summary to view statistics such as error count, calls count, and commits that the app displays on the errors by subsystem summary view.
  12. To view the details for a row:
    1. Select the row and click Details.
    2. Double-click the row.
  13. Click back_icon_app-24.png to return to the subsystem detail view.
  14. (Optional) Click refresh_app-24.png to update the information displayed in the subsystem detail view.
  15. (Optional) Click Options NG_gear.png to open the Options dialog box and select new search options.
  16. Click  back_icon_app-24.png  to return to the errors by subsystem view.
  17. (Optional) Click  refresh_app-24.png to update the information displayed in the errors by subsystem view.

 

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

BMC AMI Command Center for Db2 13.2