How to Start and Stop Oracle RAC Services Easily
To manage the state of a service (making it offline or online) in an Oracle RAC environment, you can use the srvctl command.
1. Make a Service Offline (Stop a Service)
To stop a service (make it offline) across all instances or specific instances, use the following command:
Stop Service on All Instances:
srvctl stop service -db <db_unique_name> -service <service_name>
Stop Service on a Specific Instance:
srvctl stop service -db <db_unique_name> -service <service_name> -instance <instance_name>
This stops the service only on the specified instance.
2. Make a Service Online (Start a Service)
To start a service (make it online) across all instances or on specific instances, use the following command:
Start Service on All Instances:
srvctl start service -db <db_unique_name> -service <service_name>
This will start the service on all its configured instances.
Start Service on a Specific Instance:
srvctl start service -db <db_unique_name> -service <service_name> -instance <instance_name>
This will start the service only on the specified instance.
3. Check Service Status After Operation
After starting or stopping the service, you can check its status to verify the changes:
srvctl status service -db <db_unique_name> -service <service_name>
This will show you whether the service is running or stopped on each instance.