Table of Contents
Configuration:
- RAC 11.2.0.4 / CRS 11.2.0.4 Policy: Admin Based
Setup/Start service
$ srvctl add service -d grac4 -s report -r grac41 -a grac42 -P basic -e session $ srvctl status service -d grac4 -s report Service report is not running. $ srvctl start service -d grac4 -s report $ srvctl config service -d grac4 -s report Service name: report Service is enabled Server pool: grac4_report Cardinality: 1 Disconnect: false Service role: PRIMARY Management policy: AUTOMATIC DTP transaction: false AQ HA notifications: false Failover type: SESSION Failover method: NONE TAF failover retries: 0 TAF failover delay: 0 Connection Load Balancing Goal: LONG Runtime Load Balancing Goal: NONE TAF policy specification: BASIC Edition: Preferred instances: grac41 Available instances: grac42
Testing Service relocation using sqlplus and srvctl
$ srvctl status service -d grac4 -s report Service report is running on instance(s) grac41 $ srvctl stop instance -d grac4 -i grac41 $ srvctl status service -d grac4 -s report Service report is not running. --> No service relocation $ srvctl start service -d grac4 -s report $ srvctl status service -d grac4 -s report Service report is running on instance(s) grac41 Now do a shutdown abort via sqlplus SQL> shutdown abort ORACLE instance shut down. $ srvctl status service -d grac4 -s report Service report is running on instance(s) grac42 --> Service reloaction works
Relocate service report back from grac41 to grac42
$ srvctl status service -d grac4 -s report Service report is running on instance(s) grac41 $ srvctl relocate service -d grac4 -s report -i grac41 -t grac42 $ srvctl status service -d grac4 -s report Service report is running on instance(s) grac42
What commands issue a service relocation ?
Sqlplus : SQL> shutdown abort SQL> shutdown immediate SQL> shutdown Srvctl using srvctl relocate service $ srvctl relocate service -d grac4 -s report -i grac41 -t grac42 kill or crash of RDBMS processes like PMON Note service relocation does occur if using srvctl stop instance $ srvctl stop instance -d grac4 -i grac41
It’s the expected behaviour. If you want automatic service relocation where you do a stop instance add a ‘-f’ at the end of command line like: srvctl stop instance -d grac4 -i grac41 -f