Sun Cluster Geographic Edition Data Replication Guide for Oracle Data Guard

Working With Oracle Data Guard Protection Groups

Unlike other data replication mechanisms, such as Sun StorageTek Availability Suite, Hitachi TrueCopy, and EMC SRDF, Oracle Data Guard is an integral part of Oracle RAC software. Consequently, you do not place Oracle RAC server proxy resource groups under Sun Cluster Geographic Edition control as you do when you are using one of these host or storage-based data replication mechanisms. You can add Oracle Data Guard Broker configurations for databases that are being replicated by Oracle Data Guard to Sun Cluster Geographic Edition without stopping the databases or the replication.

Overview of Administering Protection Groups

To add an existing Oracle Data Guard Broker configuration that contains an Oracle Data Guard replicated database to a new protection group, you will complete the following general procedures.

  1. On a node in either cluster, create the protection group.

    This procedure is covered in How to Create and Configure an Oracle Data Guard Protection Group.

  2. On the same node, add the Oracle Data Guard Broker configuration to the protection group.

    This procedure is covered in How to Add an Oracle Data Guard Broker Configuration to an Oracle Data Guard Protection Group.

  3. On a node in the other cluster, retrieve the protection group configuration.

    This procedure is covered in How to Replicate the Oracle Data Guard Protection Group Configuration to a Partner Cluster.

  4. On the same node, add the Oracle shadow RAC server proxy resource group and application resource group to the protection group.

    This procedure is covered in How to Add an Application Resource Group to an Oracle Data Guard Protection Group.

  5. Activate the protection group, either globally from either cluster or locally from the primary.

    This procedure is covered in How to Activate an Oracle Data Guard Protection Group.

ProcedureHow to Administer an Oracle Data Guard Protection Group (Example)


Note –

The following example shows all the steps that are involved in administering Oracle Data Guard protection groups, as described in more detail in procedures that are included later in this chapter.


  1. Create the protection group on the cluster-paris cluster.


    phys-paris-1# geopg create -d odg -o primary -s paris-newyork-ps sales-pg
    Protection group "sales-pg" has been successfully created

    The cluster-paris cluster is the primary cluster. You do not need to set any additional Oracle Data Guard protection group properties.

  2. Add the Oracle Data Guard Broker configuration, mysales.com, to the protection group.


    Caution – Caution –

    To ensure security, do not supply a password when you specify the sysdba_password property. If you specify only -p sysdba_password=, the geopg command prompts you to type an actual password, which is not displayed as you type it. You can pipe the password to the command if you want to drive the geopg command from another shell script.

    Also, to run the following command successfully, you must already be able to connect to both a local and a remote database service.



    phys-paris-1# geopg add-replication-component  \
         -p local_database_name=sales \
         -p remote_database_name=salesdr \
         -p local_db_service_name=sales-svc \
         -p remote_db_service_name=salesdr-svc \
         -p standby_type=physical \
         -p replication_mode=MaxPerformance \
         -p sysdba_username=sys \
         -p sysdba_password= \
         -p local_rac_proxy_svr_rg_name=sales-rac-proxy-svr-rg \
         -p remote_rac_proxy_svr_rg_name=salesdr-rac-proxy-svr-rg \
         mysales.com sales-pg
    Oracle Data Guard configuration "mysales.com" successfully added
    	to the protection group "sales-pg"
  3. Confirm that the shadow Oracle RAC and replication resource groups and resources that you added to the protection group in the preceding step were added.


    phys-paris-1# clresourcegroup status
    === Cluster Resource Groups ===
    
    Group Name                            Node Name        Suspended   Status
    ----------                            ---------        ---------   ------
    rac-framework-rg                      phys-paris-1     No          Online
                                          phys-paris-2     No          Online
    
    scal-oradata-dg-rg                    phys-paris-1     No          Online
                                          phys-paris-2     No          Online
    
    qfs-oradata-mds-rg                    phys-paris-1     No          Online
                                          phys-paris-2     No          Offline
    
    scal-oradata-mp-rg                    phys-paris-1     No          Online
                                          phys-paris-2     No          Online
    
    rac_server_proxy-rg                   phys-paris-1     No          Online
                                          phys-paris-2     No          Online
    
    geo-clusterstate                      phys-paris-1     No          Online
                                          phys-paris-2     No          Online
    
    geo-infrastructure                    phys-paris-1     No          Offline
                                          phys-paris-2     No          Online
    
    sales-pg-odg-rep-rg                   phys-paris-1     No          Online
                                          phys-paris-2     No          Offline
    
    mysales_com-rac-proxy-svr-shadow-rg   phys-paris-1     No          Unmanaged
                                          phys-paris-2     No          Unmanaged
    
    phys-paris-1# clresource status 
    Resource Name                         Node Name        State                      Status Message
    -------------                         ---------        -----                      --------------
    rac-framework-rs                      phys-paris-1     Online                     Online
                                          phys-paris-2     Online                     Online
    
    rac-udlm-rs                           phys-paris-1     Online                     Online
                                          phys-paris-2     Online                     Online
    
    rac-svm-rs                            phys-paris-1     Online                     Online
                                          phys-paris-2     Online                     Online
    
    crs_framework-rs                      phys-paris-1     Online                     Online
                                          phys-paris-2     Online                     Online
    
    scal-oradata-dg-rs                    phys-paris-1     Online                     Online - Diskgroup
                                                                                                  online
                                          phys-paris-2     Online                     Online - Diskgroup
                                                                                                  online
    
    qfs-oradata-mds-rs                    phys-paris-1     Online                     Online - Service is
                                                                                                  online.
                                          phys-paris-2     Offline                    Offline
    
    scal-oradata-mp-rs                    phys-paris-1     Online                     Online
                                          phys-paris-2     Online                     Online
    
    rac_server_proxy-rs                   phys-paris-1     Online                     Online - Oracle 
                                                                                         instance UP
                                          phys-paris-2     Online                     Online - Oracle
                                                                                         instance UP
    
    geo-servicetag                        phys-paris-1     Online but not monitored   Online
                                          phys-paris-2     Online but not monitored   Online
    
    geo-clustername                       phys-paris-1     Offline                    Offline
                                          phys-paris-2     Online                     Online - 
                                                                                         LogicalHostname
                                                                                         online.
    
    geo-hbmonitor                         phys-paris-1     Offline                    Offline
                                          phys-paris-2     Online                     Online - Daemon OK
    
    geo-failovercontrol                   phys-paris-1     Offline                    Offline
                                          phys-paris-2     Online                     Online - Service is
                                                                                         online.
    
    mysales_com-odg-rep-rs                phys-paris-1     Offline                    Offline
                                          phys-paris-2     Offline                    Offline
    
    mysales_com-rac-proxy-svr-shadow-rs   phys-paris-1     Offline                    Offline
                                          phys-paris-2     Offline                    Offline
  4. Locally activate the protection group.


    phys-paris-1# geopg start -e local sales-pg
    Processing operation... The timeout period for this operation on 
    	each cluster is 3600 seconds (3600000 milliseconds)...
    Protection group "sales-pg" successfully started.

    If your mysales.com Oracle Data Guard Broker configuration is not already enabled, this process might take a few minutes or more. The actual time that the process takes depends on the configuration of your primary and standby databases as well as the distance between the clusters.

  5. Verify that the data replication is successfully started.


    phys-paris-1# geoadm status
    Cluster: cluster-paris
    
       Partnership "paris-newyork-ps"      : OK
          Partner clusters                 : cluster-newyork
          Synchronization                  : OK
          ICRM Connection                  : OK
    
          Heartbeat "hb_cluster-paris~cluster-newyork" monitoring \
    "paris-newyork-ps" OK 
             Plug-in "ping-plugin"            : Inactive
             Plug-in "tcp_udp_plugin"         : OK
    
       Protection group "sales-pg"               : Error
          Partnership                         : paris-newyork-ps
          Synchronization                     : Error
    
          Cluster cluster-paris               : OK
             Role                             : Primary
             Activation State                 : Activated
             Configuration                    : OK
             Data replication                 : OK
             Resource groups                  : None
    
          Cluster cluster-newyork             : Unknown
             Role                             : Unknown
             Activation State                 : Unknown
             Configuration                    : Unknown
             Data Replication                 : Unknown
             Resource Groups                  : Unknown
  6. On one node of the partner cluster, retrieve the protection group.


    phys-newyork-1# geopg get -s paris-newyork-ps sales-pg
    Protection group "sales-pg" has been successfully created.
  7. Confirm that the shadow Oracle RAC and replication resource groups and resources for the protection group that you retrieved in the preceding step were retrieved.


    phys-newyork-1# clresourcegroup status
    
    === Cluster Resource Groups ===
    
    Group Name                            Node Name         Suspended   Status
    ----------                            ---------         ---------   ------
    rac-framework-rg                      phys-newyork-1    No          Online
                                          phys-newyork-2    No          Online
    
    scal-oradata-dg-rg                    phys-newyork-1    No          Online
                                          phys-newyork-2    No          Online
    
    qfs-oradata-mds-rg                    phys-newyork-1    No          Online
                                          phys-newyork-2    No          Offline
    
    scal-oradata-mp-rg                    phys-newyork-1    No          Online
                                          phys-newyork-2    No          Online
    
    rac_server_proxy-rg                   phys-newyork-1    No          Online
                                          phys-newyork-2    No          Online
    
    geo-clusterstate                      phys-newyork-1    No          Online
                                          phys-newyork-2    No          Online
    
    geo-infrastructure                    phys-newyork-1    No          Offline
                                          phys-newyork-2    No          Online
    
    sales-pg-odg-rep-rg                   phys-newyork-1    No          Online
                                          phys-newyork-2    No          Offline
    
    mysales_com-rac-proxy-svr-shadow-rg   phys-newyork-1    No          Unmanaged
                                          phys-newyork-2    No          Unmanaged
    phys-newyork-1# clresource status
    
    === Cluster Resources ===
    
    Resource Name                         Node Name         State         Status Message
    -------------                         ---------         -----         --------------
    rac-framework-rs                      phys-newyork-1    Online        Online
                                          phys-newyork-2    Online        Online
    
    rac-udlm-rs                           phys-newyork-1    Online        Online
                                          phys-newyork-2    Online        Online
    
    rac-svm-rs                            phys-newyork-1    Online        Online
                                          phys-newyork-2    Online        Online
    
    crs_framework-rs                      phys-newyork-1    Online        Online
                                          phys-newyork-2    Online        Online
    
    scal-oradata-dg-rs                    phys-newyork-1    Online        Online - Diskgroup online
                                          phys-newyork-2    Online        Online - Diskgroup online
    
    qfs-oradata-mds-rs                    phys-newyork-1    Online        Online - Service is online.
                                          phys-newyork-2    Offline       Offline
    
    scal-oradata-mp-rs                    phys-newyork-1    Online        Online
                                          phys-newyork-2    Online        Online
    
    rac_server_proxy-rs                   phys-newyork-1    Online        Online - Oracle instance UP
                                          phys-newyork-2    Online        Online - Oracle instance UP
    
    geo-servicetag                        phys-newyork-1    Online but    Online
                                                               not monitored
                                          phys-newyork-2    Online but    Online
                                                               not monitored
    
    geo-clustername                       phys-newyork-1    Offline       Offline
                                          phys-newyork-2    Online        Online - LogicalHostname online.
    
    geo-hbmonitor                         phys-newyork-1    Offline       Offline
                                          phys-newyork-2    Online        Online - Daemon OK
    
    geo-failovercontrol                   phys-newyork-1    Offline       Offline
                                          phys-newyork-2    Online        Online - Service is online.
    
    mysales_com-odg-rep-rs                phys-newyork-1    Offline       Offline
                                          phys-newyork-2    Offline       Offline
    
    mysales_com-rac-proxy-svr-shadow-rs   phys-newyork-1    Offline       Offline
                                          phys-newyork-2    Offline       Offline
  8. From any node in a partner cluster, add the shadow RAC server proxy resource group to the protection group.


    # geopg add-resource-group mysales_com-rac-proxy-svr-shadow-rg sales-pg
    Following resource groups were successfully added:
    			"mysales_com-rac-proxy-svr-shadow-rg"

    Adding the shadow RAC server proxy resource group to the protection group is not critical to the operation of the replication. The resource contained within it simply reflects the status of the real RAC server proxy resource group and highlights whether the cluster is the Oracle Data Guard primary cluster.

  9. From any node in a partner cluster, globally activate the protection group on both clusters.


    # geopg start -e global sales-pg
    Processing operation... The timeout period for this operation on 
    	each cluster is 3600 seconds (3600000 milliseconds)...
    Protection group "sales-pg" successfully started.
  10. Verify that the protection group is successfully created and activated.


    phys-newyork-1# geoadm status
    Cluster: cluster-newyork
    
    Partnership "paris-newyork-ps": OK
      Partner clusters    : cluster-newyork
      Synchronization     : OK
      ICRM Connection     : OK
    
      Heartbeat "hb_cluster-newyork~cluster-paris" monitoring "cluster-paris": OK
         Heartbeat plug-in "ping_plugin"   : Inactive
         Heartbeat plug-in "tcp_udp_plugin": OK
    
    Protection group "sales-pg"  : OK
      Partnership            : "paris-newyork-ps"
      Synchronization        : OK
    
      Cluster cluster-newyork   : OK
         Role                 : Primary
         PG activation state  : Activated
         Configuration        : OK
         Data replication     : OK
         Resource groups      : OK
    
      Cluster cluster-paris : OK
         Role                 : Secondary
         PG activation state  : Activated
         Configuration        : OK
         Data replication     : OK
         Resource groups      : OK