crsctl stop resource

Use the crsctl stop resource command to stop running resources.

Syntax

crsctl stop resource {resource_name [...] | -w "filter" | -all} [-n server_name]
   [-k cid] [-d did] [-env "env1=val1,env2=val2,..."]
   [-begin | -end] [-i] [-f] [-l]

Parameters

Table E-23 crsctl stop resource Command Parameters

Parameter Description
resource_name [...]

One or more space-delimited resource names to stop.

-w "filter"

Specify a resource filter that Oracle Clusterware uses to limit the number of resources stopped. The filter must be enclosed in double quotation marks (""). Examples of resource filters include:

  • "TYPE == cluster_resource": This filter limits Oracle Clusterware to stop only resources of cluster_resource type

  • "CHECK_INTERVAL > 10": This filter limits Oracle Clusterware to stop resources that have a value greater than 10 for the CHECK_INTERVAL resource attribute

  • "(CHECK_INTERVAL > 10) AND (NAME co 2)": This filter limits Oracle Clusterware to stop resources that have a value greater than 10 for the CHECK_INTERVAL resource attribute and the name of the resource contains the number 2

See Also: "Filters" for more information

-all

Use this parameter to stop all resources in the cluster.

-n server_name

Specify the name of the server on which the resource instances you want to stop reside. If you do not specify a server, then Oracle Clusterware stops all instances of the resource.

-k cid

Specify the resource cardinality ID. If you specify this parameter, then Oracle Clusterware stops the resource instances that have the cardinality you specify.

-d did

Specify the resource degree ID. If you specify this parameter and the degree ID is greater than 1, then Oracle Clusterware stops all resource instances that meet this criteria.

-env "env1=val1,
env2=val2,..."

You can optionally override one or more resource profile attribute values with the -env command parameter. If you specify multiple environment name-value pairs, then you must separate each pair with a comma and enclose the entire list in double quotation marks ("").

-begin

You can specify this parameter to begin a transparent HA action.

-end

You can specify this parameter to end a transparent HA action.

-i

If you specify -i, then the command returns an error if processing this command requires waiting for Oracle Clusterware to unlock the resource or its dependents. Sometimes, Oracle Clusterware locks resources or other objects to prevent commands from interfering with each other.

-f

Specify the -f parameter to force the stopping of the resource when it has other resources running that depend on it. Dependent resources are relocated or stopped when you use this parameter.

-l

Use the -l parameter to leave the resources in the state they were in if the stop command fails.

Usage Notes

  • Any one of the three following options is required to specify which resources you want to stop:

    • You can specify one or more resources to stop

    • You can specify a resource filter that Oracle Clusterware uses to match resources to stop

    • You can specify the -all parameter with the -n server_name parameter to stop all resources on a particular server

  • You must have read and execute permissions on the specified resources to stop them

  • Do not use this command for any resources with names that begin with ora because these resources are Oracle resources

  • Oracle does not support stopping managed applications outside of the Oracle Grid Infrastructure

Example

To stop a resource:

$ crsctl stop resource -n node1 -k 2