DGMGRL> edit configuration set property BystandersFollowRoleChange=NONE;
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.
This command creates the mysales_com-rac-proxy-svr-shadow-rg shadow resource group.
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. For ease of management and greater security, configure an Oracle wallet to manage public key security credentials on Oracle clients and servers. If you use an Oracle wallet, specify only -p sysdba_username= and the Geographic Edition Data Guard module will use the /@local_service_name or /@remote_service_name connect string syntax. For more information, see Using Oracle Wallet Manager in Oracle Database Advanced Security Administrator's Guide (http://docs.oracle.com/cd/E11882_01/network.112/e40393/asowalet.htm#ASOAG160). 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"
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
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.
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
phys-newyork-1# geopg get -s paris-newyork-ps sales-pg Protection group "sales-pg" has been successfully created.
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
# 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 Oracle database-server 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 Oracle database-server resource group and highlights whether the cluster is the Oracle Data Guard primary cluster.
# 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.
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