Viewing expert rule violations
The SQL Assurance view displays a summary of the SQL statements that violated the expert rules used to evaluate their performance.
To view expert rule violations
- Open or create a workspace.
In the Product Tools perspective, click the Add View
menu arrow, and then click Add SQL Assurance View.
- Enter a name for the view.
- Select a Time frame for the expert rule violations to display.
- (Optional) To limit the list of Db2 connections to your favorites, select Show only favorites.
- Select one or more Db2 connections.
Click OK.
The SQL Assurance summary view is displayed in the results pane.
For more information, see SQL Assurance summary view.- (Optional) To adjust the records displayed, click View settings .
Open the subsystem detail view by:
- Clicking the subsystem's bar on the bar chart
- Double-clicking the subsystem's row on the grid
- Select the subsystem's row on the grid and click Details
- Right-click the subsystem's row on the grid and select Details from the context menu
The SQL Assurance detail view is displayed.
For more information, see SQL Assurance detail view.- (Optional) To adjust the time frame, perform the following steps:
- Enter a value for Time frame.
- Select a unit from the list.
- Click Refresh
.
(Optional) To filter the violations displayed:
- Select or clear the check boxes in the pie chart legend
To select all check boxes in the pie chart legend, select Select all . - Click Filter violations
For more information, see To filter the expert rule violations.
If you filter the violations displayed, BMC AMI Command Center displays (Filters Applied) next to the title of the results pane and changes the color of the filter icon (
).
- Select or clear the check boxes in the pie chart legend
- Click Save Workspace
to save the changes to the workspace.
To filter the expert rule violations
- In the SQL Assurance details view, click Filter violations
.
- Click Insert a row
.
In the Add Expression dialog box, complete the following fields:
Field
Action
Column
Select a column name from the displayed list.
Operator
Select an operator from the displayed list.
Note: The LIKE operator accepts only Db2 wildcards (% and _).Value
Enter a value. The value is case sensitive and is automatically enclosed in the delimiter that you selected.
Logic
Select one of the following options:
- AND
- OR
- Click Save.
- Repeat steps 2 through 4 to continue adding rows until you have built the search clause for the filter.
(Optional) If you want to make any changes, edit the search criteria.Use the following buttons to add, edit, remove, or move rows. (You can perform the same operations by right-clicking in a row and selecting the appropriate command.)
Button
Description
Adds a row to the Search Clause criteria grid
In the grid, selecting a row and clicking
adds a row above the one that you selected.
Lets you Edit a row in the Search Clause criteria grid
Removes the selected row from the grid
Moves the selected row up
Moves the selected row down
You can also edit the search clause directly by typing in the search-clause text area.
You can use the following buttons:
Button
Description
Column
Click in the clause and, from the menu, select a column name to add to the search clause.
Operator
Click and, from the menu, select an operator to add to the search clause.
Click to discard any changes that you made in the text area and to re-synchronize the search clause with the search criteria in the grid. (Clicking this button again would restore your unsaved changes and disable the grid.)
- When finished building the search clause, click OK.
To show properties for an expert rule violation
- In the Product Tools perspective, select an SQL Assurance view.
- Open an SQL Assurance detail view for a Db2 subsystem.
- In the expert rule violations grid, select a violation.
- Click Show properties
.
- (Optional) To view the SQL statement, click SQL.
- Click Close .
To add a VTI rule for a specific violation
- Select a violation from the grid.
- Click Ignore violation.
The Ignore Violation dialog opens with default values based on data from the violation. (Optional) Edit the following fields as needed:
Field
Description
Rule name
Enter a pattern for the Rule message number.
Type
Select the type of SQL statement to which the rule applies from the following values:
- All types
- Static SQL
- Dynamic SQL
Collection
Enter a pattern for the Db2 Collection ID for which you want to create a rule. You can use the % wildcard. A blank field is interpreted as containing a single % wildcard.
Package
Enter a pattern for the Db2 package name for which you want to create a rule. You can use the % wildcard. A blank field is interpreted as containing a single % wildcard.
Version
Enter a pattern for the Db2 package version for which you want to create a rule. You can use the % wildcard. A blank field is interpreted as containing a single % wildcard.
SQL
The SQL options are shown only for rules defined to use the SQL statement as criteria. Select the appropriate option button from the following options:
- Use the SQL statement as criteria
- Allow any statement
To view the full statement, click View SQL
.
If you adjust the default values the rule might apply to multiple violations.
- Enter a Comment to explain why the violation is ignored.
- Click OK.
SQL Assurance summary view
The following table describes the options available in the SQL Assurance summary view:
Task | Description |
---|---|
Change the time interval |
|
Change the subsystems displayed |
|
Refresh the data displayed | Click Refresh |
View expert rule violations for a subsystem | Perform one of the following actions:
|
Copy data for one or more subsystems to the clipboard |
|
Export data for one or more subsystems to a CSV file |
|
SQL Assurance detail view
The following table describes the options available in the SQL Assurance detail view:
Task | Description |
---|---|
Change the time interval |
|
Refresh the data displayed | Click Refresh |
Filter the violations displayed | Perform one or more of the following actions:
If you filter the violations, BMC AMI Command Center (Filters Applied) next to the title of the results pane and changes the color of the filter icon ( |
Clear the filter | Click Clear filter |
View a sample rule message | Hover the cursor over a section of the pie chart |
Show properties for an expert rule violation | Perform one of the following actions:
For more information, see To show properties for an expert rule violation. |
Access Manage Violations to Ignore rules view | Click Manage Violations to Ignore rules. For more information, see Managing-SQL-Assurance-VTI-rules |
Add a VTI rule for a specific violation |
For more information, see To add a VTI rule for a specific violation. |
Delete violations |
|
Return to previous view | Click back |