How to swinging the RAC(ASM) database from one cluster to another cluster:
1. Un-mount all the diskgroups from the source RAC cluster on all the instances.
ALTER DISKGROUP ALL DISMOUNT; or diskgroups specific to the DB
2. Shutdown all the instances(database).
srvctl stop database -d DB_NAME
3. Copy DB init.ora file to all the RAC nodes.
4. Swinging the disks from one cluster to other cluster. (Storage and Sys Admin Task).
High Level: After ASM(un-mount) and DB are stopped, SAN team un-zone the storage from source RAC cluster and zone it to destination RAC cluster.
And perform the ASM scan disk (/etc/init.d/oracleasm scandisks) to see all the disks in destination ASM instance.
5. Mount all the diskgroups on the destination RAC cluster on all the instances.
ALTER DISKGROUP ALL MOUNT;
6. Register all the instances and database.
srvctl add instance -d DB_NAME -i INSTANCE1 -n NODE1
srvctl add instance -d DB_NAME -i INSTANCE2 -n NODE2
srvctl add instance -d DB_NAME -i INSTANCE3 -n NODE3
srvctl add instance -d DB_NAME -i INSTANCE4 -n NODE4
srvctl add database -d DB_NAME -o $ORACLE_HOME
srvctl modify instance -d DB_NAME -i INSTANCE_NAME -s ASM_INSTANCE_NAME
7. Startup all the instances(database).
srvctl start database -d DB_NAME
or crs_start -all
8. Create all the services using dbca. Incase of any issues with dbca use below command.
srvctl add service -d DB_NAME -s SERVICE_NAME -r INSTANCE1,INSTANCE2,INSTANCE3 -a INSTANCE4 -P BASIC
-r for preferred nodes
-a for available nodes
-P for TAF Policy (NONE, BASIC or PRECONNECT)
9. Update /etc/oratab, tnsnames.ora on all the servers and S drive.
10. Update all the new diskgroups in ASM init.ora file on the destination RAC cluster on all the nodes.
11. Cleanup the database and instances CRS resources from the source RAC cluster.
srvctl remove instance -d DB_NAME -i INSTANCE1
srvctl remove instance -d DB_NAME -i INSTANCE2
srvctl remove instance -d DB_NAME -i INSTANCE3
srvctl remove instance -d DB_NAME -i INSTANCE4
srvctl remove database -d DB_NAME
srvctl remove service -d DB_NAME -s SERVICE_NAME
Subscribe to:
Post Comments (Atom)
1 comment:
Great work.
Thanks for sharing.
Post a Comment