Sun Cluster Geographic Edition Data Replication Guide for Oracle Data Guard

Activating and Deactivating a Protection Group

This section describes how to perform the following procedures:

When you activate a protection group, it assumes the role that you assigned to it during configuration.

For more information about configuring protection groups, see How to Create and Configure an Oracle Data Guard Protection Group.

ProcedureHow to Activate an Oracle Data Guard Protection Group

You can activate a protection group in the following ways:

When you activate a protection group, the data replication product that you are using determines the clusters on which data replication can start. For example, the Oracle Data Guard software allows data replication to start only if you activate a protection group in one of the following ways:

So, if you attempt to activate a protection group locally from the standby cluster, data replication does not start. However, if you activate a protection group globally from the standby cluster, data replication starts.

  1. Log in to a cluster node.

    To complete this step, you need to be assigned the Geo Management RBAC rights profile. For more information about RBAC, see Sun Cluster Geographic Edition Software and RBAC in Sun Cluster Geographic Edition System Administration Guide.

  2. Activate the protection group on the local cluster.

    When you activate a protection group on the primary cluster, its application resource groups are also brought online.


    phys-node-n# geopg start -e scope [-n] ODGprotectiongroup
    
    -e scope

    Specifies the scope of the command.

    If the scope is local, the command operates on the local cluster only. If the scope is global, the command operates on both clusters that deploy the protection group.


    Note –

    The property values, such as global and local, are not case sensitive.


    -n

    Prevents the start of data replication when the protection group starts.

    If you omit this option, the data replication subsystem starts at the same time as the protection group, and the command performs the following operations on each Oracle Data Guard Broker configuration in the protection group:

    • Verifies that the resource group that is named in the local_rac_proxy_svr_rg_name property contains a resource of type SUNW.scalable_rac_server_proxy.

    • Verifies that the Oracle dgmgrl command can connect using the values that are given for sysdba_username, sysdba_password, and local_db_service_name.

    • Verifies that the role configured for the replication resource is the same as the role of the protection group on the local cluster.

    • Verifies that the Oracle Data Guard Broker configuration details match those that are held by Sun Cluster Geographic Edition. The details to check include which cluster is primary, the configuration name, the database mode (for both the primary and standby clusters), the replication mode, and the standby type.

    ODGprotectiongroup

    Specifies the name of the protection group.

    The geopg start command uses the clrs enable resources and clrg online resourcegroups command to bring resource groups and resources online. For more information about using this command, see the clresource(1CL) and clresourcegroup(1CL) man pages.

    If the role of the protection group is primary on the local cluster, the geopg start command performs the following operations:

    • Runs a script that is defined by the RoleChange_ActionCmd property

    • Brings the application resource groups, including the shadow RAC server proxy resource groups, in the protection group online on the local cluster

    If the command fails, the Configuration status might be set to Error, depending on the cause of the failure. The protection group remains deactivated, but data replication might be started and some resource groups might be brought online.

    Run the geoadm status command to obtain the status of your system.

    If the Configuration status is set to Error, revalidate the protection group by using the procedures that are described in How to Validate an Oracle Data Guard Protection Group.


Example 2–10 Globally Activating an Oracle Data Guard Protection Group

This example shows how to activate a protection group globally.


phys-paris-1# geopg start -e global sales-pg


Example 2–11 Activating an Oracle Data Guard Protection Group Locally

This example shows how to activate a protection group on a local cluster only. This local cluster might be a primary cluster or a standby cluster, depending on the role of the cluster.


phys-paris-1 geopg start -e local sales-pg

ProcedureHow to Deactivate an Oracle Data Guard Protection Group

You can deactivate a protection group in the following ways:

The result of deactivating a protection group on the primary or standby cluster depends on the type of data replication that you are using. If you are using Oracle Data Guard software, you can stop the Oracle Data Guard configuration from the primary or the standby cluster when the configuration is enabled because the Oracle Data Guard command-line interface (dgmgrl) on both clusters still accepts commands.

  1. Log in to a cluster node.

    To complete this step, you need to be assigned the Geo Management RBAC rights profile. For more information about RBAC, see Sun Cluster Geographic Edition Software and RBAC in Sun Cluster Geographic Edition System Administration Guide.

  2. Deactivate the protection group on all nodes of the local cluster.

    When you deactivate a protection group, its application resource groups are also unmanaged.


    phys-node-n# geopg stop -e scope [-D] protectiongroupname
    
    -e scope

    Specifies the scope of the command.

    If the scope is local, the command operates on the local cluster only. If the scope is global, the command operates on both clusters where the protection group is located.


    Note –

    The property values, such as global and local, are not case sensitive.


    -D

    Specifies that only data replication be stopped and the protection group be put online.

    If you omit this option, the data replication subsystem and the protection group are both stopped. If the role of the protection group on the local cluster is set to primary and you omit the -D option, the application resource groups are taken offline and put in an Unmanaged state.

    protectiongroupname

    Specifies the name of the protection group.

    If the role of the protection group is primary on the local cluster, the geopg stop command disables the Oracle Data Guard Broker configuration.

    If the geopg stop command fails, run the geoadm status command to see the status of each component. For example, the Configuration status might be set to Error depending on the cause of the failure. The protection group might remain activated even though some resource groups might be unmanaged. The protection group might be deactivated with data replication running.

    If the Configuration status is set to Error, revalidate the protection group by using the procedures described in How to Validate an Oracle Data Guard Protection Group.


Example 2–12 Deactivating an Oracle Data Guard Protection Group on All Clusters

This example shows how to deactivate a protection group on all clusters.


phys-paris-1# geopg stop -e global sales-pg


Example 2–13 Deactivating an Oracle Data Guard Protection Group on a Local Cluster

This example shows how to deactivate a protection group on the local cluster.


phys-paris-1# geopg stop -e local sales-pg


Example 2–14 Stopping Oracle Data Guard Data Replication While Leaving the Protection Group Online

This example shows how to stop only data replication on a local cluster.


phys-paris-1 geopg stop -e local -D sales-pg

If you decide later to deactivate both the protection group and its underlying data replication subsystem, you can rerun the command without the -D option.


phys-paris-1# geopg stop -e local sales-pg


Example 2–15 Deactivating an Oracle Data Guard Protection Group While Keeping Application Resource Groups Online

This example shows how to keep online two application resource groups, apprg1 and apprg2, while deactivating their protection group, sales-pg.

  1. Remove the application resource groups from the protection group.


    phys-paris-1# geopg remove-resource-group apprg1,apprg2 sales-pg
    
  2. Deactivate the protection group.


    phys-paris-1# geopg stop -e global sales-pg