srvctl stop service

Stops one or more services globally across the cluster database, or on the specified instance.

Syntax and Parameters

Use the srvctl stop service command with the following syntax:

srvctl stop service -db db_unique_name [-service "services_list" 
  [-node node_name | -instance instance_name | -serverpool pool_name |
   -global_override]] [-eval] [-force]

You must enclose the list of comma-delimited service names in double quotation marks ("").

Table A-201 srvctl stop service Parameters

Parameter Description
-db db_unique_name

Unique name for the database

-service "service_name_list"

Comma-delimited list of service names enclosed in double quotation marks ("").

If you do not provide a service name list, then SRVCTL stops all services on the database.

-node node_name

The name of the node on which the services should be stopped. Use this parameter for policy-managed databases.

Note: This parameter can be used only with Oracle Clusterware.

-instance instance_name

The name of the instance for which the services should be stopped. Use this parameter for administrator-managed databases.

Note: This parameter can be used only with Oracle Clusterware.

-serverpool pool_name

The name of the server pool that contains the service

-global_override

Override value to operate on a global service. This parameter is ignored if the service is not a global service.

-eval

Use this parameter to hypothetically evaluate the impact of the command on the system.

-force

Force SRVCTL to stop the service; this causes SRVCTL to disconnect all of the sessions transactionally, requiring the sessions using the service to reconnect and then connect to another instance.

Note: If you do not specify the -force parameter, then sessions already connected to this service stay connected, but new sessions cannot be established to the service.

Examples

The following example stops a service for all cluster database instances:

$ srvctl stop service -db crm -service "crm"

The following example stops a service on a specified instance:

$ srvctl stop service -db crm -service "crm" -instance crm2