After configuring the replication objects within VCS, you can use VCS commands to migrate the role of the cluster on the primary site to the remote cluster. In the procedure below, VCS takes the replicated Oracle RAC database service group, oradb1_grp
, offline on the primary site and brings it online on the secondary site; the secondary site now assumes the role of the primary site.
Note
The hagrp
-switch
command cannot migrate a parallel group within a cluster or between clusters in a global cluster environment.
# hagrp -offline oradb1_grp -any
Wait for VCS to take all Oracle service groups offline on the primary site.
vxrlink -g
command with the status
option and specify the RLINK for the primary cluster (rlk_rac_clus102_priv_rac1_rvg
, in this example). You can use the command from any node on the primary cluster. For example:
netca
. Make changes to tnsnames.ora
.
Example tnsnames.ora
(Here vrts is the database name)
(ADDRESS = (PROTOCOL = TCP)(HOST = mercury-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = jupiter-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = jupiter-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = mercury-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = mercury-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = jupiter-vip)(PORT = 1521))
srvctl
command. (On Secondary)
# srvctl add database -d <database_name> -o <oracle_home> -p <spfile-on-shareddisk>
To prevent automatic database instance restart, change Management policy for the database (automatic, manual) to MANUAL using srvctl
command:
# srvctl add database -d <db-name> -p <location-of-parameter-file> -y manual
srvctl
command. Execute the following command on each node:
# srvctl add instance -d <database_name> -i <instance_name> -n <node-name>
adump
, bdump
, cdump
, dpdump
, hdump
, udump in $ORACLE_HOME/admin/<db_name>
.
# echo "SPFILE=<location of spfile on shared volume>" >>$ORACLE_HOME/dbs/init<db_name><instance-number>.ora
crs_stat
-t
. All resources should be online.