Environment information:
Oracle Grid Infrastructure 12c - 12.1.0.2.0
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0
Oracle Grid Infrastructure with three nodes:
node1 - running instance TESTDB1
node2 - ( instance TESTDB2 should be relocated on this node )
node3 - running instance TESTDB2
Check Database Configuration
srvctl config database -d TESTPRD
|
Information prior the relocation
srvctl config database -d TESTPRD Database unique name: TESTPRD Database name: TESTPRD Oracle home: /u01/app/db/11.2.0/db2 Oracle user: oracle Spfile: +DATA1/TESTPRD/spfileTESTPRD.ora Domain: Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Server pools: TESTPRD Database instances: TESTDB1,TESTDB2 Disk Groups: DATA1,REDO1,REDO2 Mount point paths: Services: TESTPRDSVC Type: RAC Database is administrator managed
|
Check which instance where is running
srvctl status database -d TESTPRD Instance TESTDB1 is running on node node1 Instance TESTDB2 is running on node node3 ---- this instance should be relocated to the node -> node2
|
Remove instance TESTDB2 - this command will remove instance from the database configuration and will update as well services dependency configuration
srvctl remove instance -d TESTPRD -i TESTDB2 Remove instance from the database TESTPRD? (y/[n]) y ---- confirm y
|
Add again instance TESTDB2 but on the node -> node2
srvctl add instance -d TESTPRD -i TESTDB2 -n node2
|
Start instance
srvctl start instance -d TESTPRD -i TESTDB2
|
Check status of the instance and alert log on the node -> node2
srvctl status database -d TESTPRD Instance TESTDB1 is running on node node1 Instance TESTDB2 is running on node node2 ---- this is correct!!!
|
Change TESTPRDSVC to be available on both instances.
(by removing the instance from database configuration, the process will update as well service configuration which required additional amendment for each service to make it available on both instances )
srvctl modify service -d TESTPRD -s TESTPRDSVC -n -i TESTDB1,TESTDB2
|
Check what has been added in the service configuration
srvctl config service -d TESTPRD -s TESTPRDSVC Service name: TESTPRDSVC Service is enabled Server pool: TESTPRD_TESTPRDSVC Cardinality: 2 Disconnect: false Service role: PRIMARY Management policy: AUTOMATIC DTP transaction: false AQ HA notifications: false Failover type: SESSION Failover method: BASIC TAF failover retries: 150 TAF failover delay: 10 Connection Load Balancing Goal: LONG Runtime Load Balancing Goal: NONE TAF policy specification: BASIC Edition: Preferred instances: TESTDB1,TESTDB2 --- you should have both instances listed here Available instances:
|
Start service
srvctl start service -d TESTPRD -s TESTPRDSVC
|
You should see service TESTPRDSVC running on all nodes
srvctl status service -d TESTPRD -s TESTPRDSVC Service TESTPRDSVC is running on instance(s) TESTDB1,TESTDB2 --- this is correct!!!!!
|
Check Database Configuration
all configuration prior the relocation should be the same!!!!!
srvctl config database -d TESTPRD Database unique name: TESTPRD Database name: TESTPRD Oracle home: /u01/app/db/11.2.0/db2 Oracle user: oracle Spfile: +DATA1/TESTPRD/spfileTESTPRD.ora Domain: Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Server pools: TESTPRD Database instances: TESTDB1,TESTDB2 Disk Groups: DATA1,REDO1,REDO2 Mount point paths: Services: TESTPRDSVC Type: RAC Database is administrator managed
|
Have fun.
This must be update in case Change local_listener is there -
local_listener as per new node - by below command.
alter system set local_listener=’(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hoexp03-vip.ad.bgep.co.uk)(PORT=1521)))’ sid=’instance_name’;