Documentation forDatabase Performance Analyzer

Create and manage rules to determine which database instances are assigned to alerts

When you are creating or updating an alert definition, you can manually select the assigned database instances, or you can use a rule to identify instances that meet one or more conditions.

If you choose Use rule, you must select an existing rule or create a new rule that identifies the group of instances you want the alert to monitor. As you add or removed monitored instances, or as the characteristics of the instances change (for example, the version is upgraded or custom property values change), DPA automatically updates the list of instances.

View information about existing rules

  1. Open the list of existing rules:

    • If you are creating an alert definition, click Use rule.

    • If you are not creating an alert definition:

      1. From the DPA menu in the upper-right corner, click Options.

      2. Under Monitor Setup > Report, Metrics, & Alerts, click Manage Rules.

      The Rules page shows information about each existing rule, such as the name, description, and number of alerts that use the rule.

  2. To find the rule you are interested in:

    • Enter a string in the Search text box to search for terms in a rule name or description.

    • Select an option from the drop-down menu above the list to change the sort order. For example, sort by assigned alerts to locate any unused rules. By default, rules are sorted by name.

  3. To see additional information about a rule, click the > to the right of "Assigned alerts" on that row.

    The Details pane shows information such as the rule definition and the alerts that use the rule.

  4. Click Matched Databases to see the database instances that meet the rule conditions.

Create a new rule

  1. Open the list of existing rules.

  2. Click Create rule.

    The Rule builder page opens.

  3. Enter a unique rule name and, optionally, a description of what instances this rule assigns.
  4. Under Assign database instance, add the first condition:
    1. Click .
    2. Select a database property or a custom property.

    3. Select an operator. Available operators include:

      containsThe selected property must contain the specified value.
      does not containThe selected property must not contain the specified value.
      =The selected property must exactly match the specified value.
      !=The selected property must not match the specified value.
      <=(Numeric properties only.) The selected property must be less than or equal to the specified value.
      >=(Numeric properties only.) The selected property must be greater than or equal to the specified value.
      <(Numeric properties only.) The selected property must be less than the specified value.
      >(Numeric properties only.) The selected property must be greater than the specified value.
    4. Select a value from the drop-down menu, or type a value and click Use user defined value.

    5. Click Add condition.

  5. Add other conditions as needed. See the following sections for more information:
  6. To see how many instances that meet the rule conditions, click Evaluate rule. Hold the mouse pointer over the number to display the list of instances.

  7. Click Save to save the rule and return to the Rules page.

Change the AND operator to an OR operator

When you add an additional condition, the Boolean operator joining the conditions is AND by default. To use an OR operator:

  1. Add an additional condition. The connecting operator is AND.

  2. Click the AND operator. The available operators are displayed to the right.

  3. Click the OR operator. The connecting operator changes to OR.

Group and ungroup conditions

Grouped conditions are surrounded by parentheses, and they are evaluated together. For example, the following rule would identify instances that 1) are either Oracle or SQL Server and 2) have a value of Production for the custom property Deployment Stage.

Group conditions

You can group conditions in either of the following ways:

  • If you have two or more conditions, you can automatically group all existing conditions when you add a new condition. Click the below the existing conditions.

    DPA places parentheses around all existing conditions to group them, and the Rule condition dialog box opens.

  • To group a pair of existing conditions without adding a new condition:

    1. Click the operator between the conditions you want to group. Options are displayed on the right.

    2. Click (Group). DPA places parentheses around the conditions to group them.

Add a condition without grouping existing conditions

If you have two or more conditions, complete the following steps to add another condition without grouping the existing conditions.

  1. Hold the mouse pointer over any condition.

  2. Click the to the right of the condition.

    The new condition is added below the selected condition, and the existing conditions are not grouped.

Ungroup conditions

  1. Hold the mouse pointer over either parenthesis.

  2. Click the to the right of the parenthesis.

Rearrange conditions

You can change the order of the conditions or move a condition into or out of a group.

  1. Hold the mouse pointer over a condition.

  2. Click the and drag the condition to a different location. As you drag the condition, blue lines indicate where you can drop it.

Edit a condition

  1. Hold the mouse pointer over the condition.

  2. Click the pencil icon to the right of the condition.

    The Rule condition dialog box opens.

  3. Change one or more values, and click Edit condition.

Remove a condition

  1. Hold the mouse pointer over the condition.

  2. Click the trash can icon to the right of the condition.

    The condition is removed. If all remaining conditions were grouped, the grouping is removed.

Edit a rule

  1. Open the list of existing rules.

  2. Select the rule, and click Edit. Or from the Details pane, click Commands > Edit rule.

  3. Change any fields. See the previous sections for more information.

  4. Click Save to save the rule and return to the Rules page.

Delete a rule

  1. Open the list of existing rules.

  2. Look at the Assigned alerts value. If any alerts use this rule, open the Details pane and note which ones use it so that you can update the alert definitions.

  3. Select the rule, and click Delete. Or from the Details pane, click Commands > Delete.

    A confirmation prompt warns you that the rule will be removed from any alert definitions that use it.

  4. Click Delete at the confirmation prompt.

    The rule is deleted and removed from any alert definitions. The alert definitions now have no instances assigned to them. Edit the alert definitions to choose a different rule or manually assign instances.