Home Commands

Use commands with the home keyword to start, stop, and obtain the status of all clusterware resources related to a Home directory.

srvctl start home

Starts all the Oracle Restart-managed or Oracle Clusterware-managed resources on the specified Oracle home.

Syntax

srvctl start home -oraclehome Oracle_home -statefile state_file -node node_name

Parameters

Table: srvctl start home Command Parameters

ParameterDescription
-oraclehome Oracle_homeSpecify the path to the Oracle home for which you want to start the Oracle Restart or Oracle Clusterware-managed resources.
-statefile state_fileSpecify the path to the directory where you want SRVCTL to write the state file.
-node node_name

Specify the name of the node on which the Oracle home resides.

Note: You can only use this parameter with Oracle Clusterware.

Example

The following command starts an Oracle home:

$ srvctl start home -oraclehome /u01/app/oracle/product/12.2.0/db_1
  -statefile ~/state.txt -node node1

srvctl status home

Displays the status of all the Oracle Restart-managed or Oracle Clusterware-managed resources for the specified Oracle home.

Syntax

srvctl status home -oraclehome Oracle_home -statefile state_file -node node_name

Parameters

Table: srvctl status home Command Parameters

ParameterDescription
-oraclehome Oracle_homeSpecify the path to the Oracle home for which you want to start the Oracle Restart or Oracle Clusterware-managed resources.
-statefile state_fileSpecify the path to the directory that contains the text file that holds the state information generated by this command.
-node node_name

Specify the name of the node on which the Oracle home resides.

Note: This parameter is required and you can only use it with Oracle Clusterware.

Example

The following example obtains the status of a particular Oracle home:

$ srvctl status home -oraclehome /u01/app/oracle/product/23.4.0/dbhome_1 -statefile
 ~/state.txt -node stvm12

The preceding command returns output similar to the following:

Database cdb1 is running on node stvm12

srvctl stop home

Stops all the Oracle Restart-managed or Oracle Clusterware-managed resources that run from the specified Oracle home.

Syntax

srvctl stop home -oraclehome Oracle_home -statefile state_file -node node_name
  [-stopoption stop_options] [-force]

Parameters

Table: srvctl stop home Command Parameters

ParameterDescription
-oraclehome Oracle_home

Specify the directory path to the Oracle home for which you want to start the Oracle Restart or Oracle Clusterware-managed resources.

Note: The path to the Oracle home you specify must be the same version as the Oracle home from which you invoke SRVCTL.

-statefile state_fileSpecify the path to the directory where you want SRVCTL to write the state file.
-node node_name

Specify the name of the node on which the Oracle home resides.

Note: You can only use this parameter with Oracle Clusterware.

-stopoption stop_options

Optionally, you can specify shutdown options for the database, such as NORMAL, TRANSACTIONAL, IMMEDIATE, or ABORT

See Also: SQL*Plus User's Guide and Reference for more information about shutdown options

-forceOptionally, you can use this parameter to stop the resources even if errors are reported.

Example

The following example stops the Oracle home:

$ srvctl stop home -oraclehome /u01/app/oracle/product/23.4.0/db_1 -statefile
 ~/state.txt