crsctl restart resource

Use the crsctl restart resource command to restart idle resources in the cluster, instead of having to run two commands to stop and start the resource.

Syntax

crsctl restart resource {resource_name [...] | -w "filter"} [-k cid] [-d did]
   [-env "env1=val1,env2=val2,..."] [-i] [-f]

Parameters

Table E-17 crsctl restart resource Command Parameters

Parameter Description
resource_name [...]

One or more space-delimited resource names to restart.

-w filter

Specify a resource filter surrounded by double quotation marks ("") that Oracle Clusterware uses to match resources. For example, -w "TYPE = ora.database.type" or -w "NAME = cs1".

See Also: "Filters" for more information

-k cid

Specify the resource cardinality ID. If you specify this parameter, then Oracle Clusterware restarts 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 restarts all resource instances that meet this criteria.

Note: You cannot use the -d parameter without specifying the -k parameter.

-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 ("").

-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

Use the -f parameter to relocate a resource running on another server on which the resource you want to restart has a hard start dependency. If you do not specify the force parameter in this case, then the start command fails.

Usage Notes

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

    • You can specify one or more resources to restart

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

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

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

Example

To restart a resource:

# crsctl restart resource myResource -s pool1 pool2