Sun Cluster Geographic Edition Data Replication Guide for Oracle Data Guard

Creating, Modifying, Validating, and Deleting an Oracle Data Guard Protection Group

This section covers the following topics:


Note –

You can create protection groups that are not configured to use data replication. To create a protection group that does not use a data replication subsystem, omit the -d datareplicationtype option when you use the geopg command. If you omit this option, the geoadm status command shows that the state of data replication is NONE.


ProcedureHow to Create and Configure an Oracle Data Guard Protection Group

The following example builds on the example configuration that was described in Chapter 1, Replicating Data With Oracle Data Guard Software.

In this example, the sales database is online on the cluster-paris cluster and is protected by Oracle Data Guard.

Ensure that the mysales.com Oracle Data Guard Broker configuration exists before you proceed, as Sun Cluster Geographic Edition does not create the configuration for you.

Before You Begin

Ensure that the following conditions are met:


Note –

Protection group names are unique in the global Sun Cluster Geographic Edition namespace. You cannot use the same protection group name in two partnerships on the same system.


You can also replicate the existing configuration of a protection group from a remote cluster to the local cluster. For more information, see Replicating the Oracle Data Guard Protection Group Configuration to a Partner Cluster.

  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. On all nodes of the local cluster, create a new protection group.


    phys-node-n# geopg create -s partnershipname -d odg \
    -o localrole [-p property [-p...]] protectiongroupname
    
    -s partnershipname

    Specifies the name of the partnership.

    -d odg

    Specifies that the protection group data is replicated by Oracle Data Guard software.

    -o localrole

    Specifies the role of this protection group on the local cluster as either primary or secondary.

    -p propertysetting

    Specifies the properties of the protection group.

    You can specify the following properties:

    • Description – Describes the protection group.

    • Timeout – Specifies the timeout period for the protection group, in seconds.

    protectiongroupname

    Specifies the name of the protection group.

    For information about the names and values that are supported by Sun Cluster Geographic Edition software, see Appendix B, Legal Names and Values of Sun Cluster Geographic Edition Entities, in Sun Cluster Geographic Edition System Administration Guide.

    For more information about the geopg command, refer to the geopg(1M) man page.

    Before creating the protection group, the data replication layer validates that the configuration is correct.

    • If the validation is successful, the local Configuration status is set to OK and the Synchronization status is set to Error.

    • If the validation is unsuccessful, the protection group is not created.

ProcedureHow to Modify an Oracle Data Guard Protection Group

Before You Begin

Ensure that the protection group that you want to modify exists locally.

  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. Modify the configuration of the protection group.


    phys-node-n# geopg set-prop -p property[-p…] protectiongroupname
    
    -p property

    Specifies the properties of the protection group.

    For more information about the properties that you can set, see Appendix A, Standard Sun Cluster Geographic Edition Properties, in Sun Cluster Geographic Edition System Administration Guide.

    protectiongroupname

    Specifies the name of the protection group.

    If the partner cluster contains a protection group of the same name, the geopg set-prop command also propagates the new configuration information to the partner cluster.

    The geopg set-prop command revalidates the protection group with the new configuration information. If the validation is unsuccessful on the local cluster, the configuration of the protection group is not modified. Otherwise, the Configuration is modified and its status is set to OK on the local cluster.

    If the Configuration status is set to OK on the local cluster, but the validation is unsuccessful on the partner cluster, the Configuration is modified on the partner cluster and the configuration status is set to Error on the partner cluster.

    For information about the names and values that are supported by Sun Cluster Geographic Edition software, see Appendix B, Legal Names and Values of Sun Cluster Geographic Edition Entities, in Sun Cluster Geographic Edition System Administration Guide.

    For more information about the geopg command, refer to the geopg(1M) man page.


Example 2–1 Modifying the Configuration of a Protection Group

This example shows how to modify the timeout property of a protection group.


phys-paris-1# geopg set-prop -p Timeout=300 sales-pg

ProcedureHow to Validate an Oracle Data Guard Protection Group

Before You Begin

When the Configuration status of a protection group is displayed as Error in the output of the geoadm status command, you can validate the configuration by using the geopg validate command. This command checks the current state of the protection group and its entities.

If the protection group and its entities are valid, the Configuration status of the protection groups is set to OK. If the geopg validate command finds an error in the configuration files, the command displays a message about the error and the configuration remains in the error state. In such a case, you can fix the error in the configuration and run the geopg validate command again.

This command validates the configuration of the protection group on the local cluster only. To validate the protection group configuration on the partner cluster, run the command again on the partner cluster.

Before validating the configuration of a protection group, ensure that the protection group you want to validate exists locally and that the common agent container is online on all nodes of both clusters in the partnership.

  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. Validate the configuration of the protection group.

    This command validates the configuration of a single protection group on the local cluster only.


    phys-node-n# geopg validate protectiongroupname
    

Example 2–2 Validating the Configuration of a Protection Group

This example shows how to validate a protection group.


phys-node-n# geopg validate sales-pg

How the Data Replication Layer Validates the Application Resource Groups and Data Replication Entities

During protection group validation, the Oracle Data Guard data replication layer validates the application resource groups and the data replication entities. The Oracle Data Guard data replication layer verifies the following conditions:

When validation is complete, the Sun Cluster Geographic Edition software creates the shadow RAC server proxy resource group and resource, the replication resource group, and the resources for this replication resource group, if they do not exist, and brings them online. If a resource group or a resource with the same name already exists, the Sun Cluster Geographic Edition operations might modify their properties. Sun Cluster Geographic Edition software cannot create a new resource group or resource of the same name if one already exists.

The Configuration status is set to OK after successful validation. If validation is not successful, the Configuration status is set to Error.

ProcedureHow to Delete an Oracle Data Guard Protection Group

Before You Begin

To delete a protection group on all clusters, run the geopg delete command on each cluster where the protection group exists.

Before deleting a protection group, ensure that the following conditions are met:


Note –

To keep the application resource groups online while deleting a protection group, remove the application resource groups from the protection group before deleting the protection group. You do not need to do anything to shadow RAC server proxy resource groups, as deleting the protection group removes these resource groups without affecting the RAC server proxy resource groups that they shadow.


  1. Log in to a node in the cluster where you want to delete the protection group, for example, cluster-paris.

    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.

    cluster-paris is the primary cluster. See Example Sun Cluster Geographic Edition Cluster Configuration in Sun Cluster Geographic Edition System Administration Guide for a sample cluster configuration.

  2. Delete the protection group.


    phys-node-n# geopg delete protectiongroupname
    

    This command deletes the configuration of the protection group from the local cluster. The command also removes the Oracle RAC server proxy resource groups and the replication resource group for the Oracle Data Guard Broker configuration in the protection group.

    If the protection group is not deleted, the Configuration status is set to Error. Resolve the error and rerun the geopg delete command.


Example 2–3 Deleting a Protection Group

This example shows how to delete a protection group from both partner clusters.


# rlogin cluster-paris -l root
phys-paris-1# geopg delete sales-pg
# rlogin cluster-newyork -l root
phys-newyork-1# geopg delete sales-pg


Example 2–4 Deleting a Protection Group While Keeping Application Resource Groups Online

This example shows how to keep two application resource groups, apprg1 and apprg2, online, while deleting the protection group that they share, sales-pg.

Remove the application resource groups from the protection group and delete the protection group.


phys-paris-1# geopg remove-resource-group apprg1,apprg2 sales-pg
phys-paris-1# geopg stop -e global sales-pg
phys-paris-1# geopg delete sales-pg

Unlike other data replication modules, the Oracle RAC server proxy resource group is not added to the protection group. Instead, a shadow RAC server proxy resource group is added to represent this resource group. You can add and remove the shadow RAC server proxy resource group to and from the protection group at any time without affecting the Oracle Data Guard data replication.

Consequently, the application resource groups that are shown in this example can have no data to replicate, as only Oracle Data Guard data replication is supported in this particular protection group. Application resource groups that might meet this criteria can be scalable web servers, where their data is static or held on some remote storage that is not controlled by this cluster.