Create groups for your Primary and Standby databases

Create groups containing your Primary and/or Standby databases and then use these groups for applying metric thresholds, incident rule sets or other operations.

To create your groups, you can use Administration Groups and/or Dynamic Groups. Administration Groups are primarily used to automatically apply monitoring and management settings such as alert thresholds and compliance standards, but can be used in all Enterprise Manager operations that work on groups. They are created by identifying the membership criteria for targets in the group. Dynamic Groups are groups also defined by membership criteria. They are primarily used for non-monitoring requirements such as privilege management. See more details on Administration Groups in Using Administration Groups.

For both Administration Groups and Dynamic Groups, you use can use a user-defined target property called High Availability Role as part of your membership criteria. The High Availability Role target property identifies a database's role: 'Primary' or 'Standby'. When a database role change occurs, Enterprise Manager automatically updates this property with the new database role ('Primary' or 'Standby'). This property can then be used to separate your primary and standby databases into the separate groups.

To set up the High Availability Role target property for use:

  • Set the OMS property oracle.sysman.db.utilizeHARoleTargetProperty to true

  • Create the target property High Availability Role and assign target property values, 'Primary' or 'Standby', to your database targets.

    Note:

    The target property values are case sensitive.

    To do this step, you can use a script from the MOS Note 2935430.1 High Availability Role Target Property.

  • Update your master list of values for this property to explicitly include the values 'Primary' and 'Standby'.

    • emcli add_to_target_properties_master_list -property_name="High Availability Role" -property_value="Primary"
    • emcli add_to_target_properties_master_list -property_name="High Availability Role" -property_value="Standby"
    • emcli use_target_properties_master_list -property_name="High Availability Role" -enable

Now you can use the High Availability Role as part of your membership criteria in Administration Groups or Dynamic Groups.

Here is an example of how the primary and standby databases switch groups during a database role change:

  1. The user-defined target property, "High Availability Role" has been created. It has the target property values of "Primary" and "Standby".

  2. There are two databases: DB1 (Primary Database) and DB2 (Standby Database) that are assigned the target property value that corresponds to their current database role:

    1. DB1 (Primary): "High Availability Role" = "Primary"

    2. DB2 (Standby): "High Availability Role" = "Standby"

  3. Database role change occurs (automatically). EM updates the target property values of the databases to their new role, Primary or Standby:

    1. DB1 (formerly Primary, now Standby): "High Availability Role" property changes from "Primary" to "Standby"

    2. DB2 (formerly Standby, now Primary): "High Availability Role" property changes from "Standby" to "Primary"

  4. EM automatically puts the new Primary and new Standby database in the appropriate groups.