By default, VIPs and database services automatically fail over to a surviving instance in the case of a crash or node eviction. The RAC VIP will automatically fail back to its home node once the failed database instance restarts. VIPs and database services can also be manually relocated, perhaps for maintenance reasons, allowing a node to be taken offline without affecting user connections to the database.
The following code shows how to relocate a database service using srvctl
:
srvctl status service -d OLTP -s ACTIVE_SRV Service ACTIVE_SRV is running on instance(s) OLTP2 srvctl relocate service -d OLTP -s ACTIVE_SRV -i OLTP2 -t OLTP1 $ srvctl status service -d OLTP -s ACTIVE_SRV Service ACTIVE_SRV is running on instance(s) OLTP1