4.3 Starting and Stopping Components Managed by Oracle Restart

«« Previous
Next »»

When Oracle Restart is in use, Oracle strongly recommends that you use the SRVCTL utility to start and stop components.

Use the SRVCTL utility to start and stop components for the following reasons:
  • When starting a component with SRVCTL, Oracle Restart can first start any components on which this component depends. When stopping a component with SRVCTL, Oracle Restart can stop any dependent components first. 
  • SRVCTL always starts a component according to its Oracle Restart configuration. Starting a component by other means may not.
For example, if you specified a server parameter file (SPFILE) location when you added a database to the Oracle Restart configuration, and that location is not the default location for SPFILEs, if you start the database with SQL*Plus, the SPFILE specified in the configuration may not be used.
  • When you start a component with SRVCTL, environment variables stored in the Oracle Restart configuration for the component are set.
You can start and stop any component managed by Oracle Restart with SRVCTL.

To start or stop a component managed by Oracle Restart with SRVCTL:

1. Prepare to run SRVCTL as described in "Preparing to Run SRVCTL".

2. Do one of the following:
  • To start a component, enter the following command:
srvctl start object [options]
  • To stop a component, enter the following command:
srvctl stop object [options]

where object is one of the components listed in Table 4-7. See the SRVCTL start command and the stop command for available options for each component.

Example 4-17 Starting a Database

This example starts the database with a DB_UNIQUE_NAME of dbcrm:

srvctl start database -db dbcrm

Example 4-18 Starting a Database NOMOUNT

This example starts the database instance without mounting the database:

srvctl start database -db dbcrm -startoption nomount

Example 4-19 Starting the Default Listener

This example starts the default listener:

srvctl start listener

Example 4-20 Starting a Specified Listener

This example starts the listener named crmlistener:

srvctl start listener -listener crmlistener

Example 4-21 Starting Database Services

This example starts the database services bizdev and support for the database with a DB_UNIQUE_NAME of dbcrm. If the database is not started, Oracle Restart first starts the database.

srvctl start service -db dbcrm -service "bizdev,support"

Example 4-22 Starting (Mounting) Oracle ASM Disk Groups

This example starts (mounts) the Oracle ASM disk groups data and recovery. The user running this command must be a member of the OSASM group.

srvctl start diskgroup -diskgroup "data,recovery"

Example 4-23 Shutting Down a Database

This example stops (shuts down) the database with a DB_UNIQUE_NAME of dbcrm. Because a stop option (-stopoption) is not provided, the database shuts down according to the stop option in its Oracle Restart configuration. The default stop option is IMMEDIATE.

srvctl stop database -db dbcrm

Example 4-24 Shutting Down a Database with the ABORT option

This example does a SHUTDOWN ABORT of the database with a DB_UNIQUE_NAME of dbcrm.

srvctl stop database -db dbcrm -stopoption abort

Note: After relinking Oracle executables, use the SRVCTL utility to start and stop components when Oracle Restart is in use. Typically, relinking Oracle executables is required on a Linux or UNIX-based operating system after you apply an operating system patch or after an operating system upgrade.

«« Previous
Next »»