Oracle® Database Administrator's Guide 11g Release 2 (11.2) Part Number E10595-06 |
|
|
View PDF |
When Oracle Restart is in use, Oracle strongly recommends that you 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.
See the srvctl add database command for a table of configuration options for a database instance.
When you start a component with SRVCTL, environment variables stored in the Oracle Restart configuration for the component are set.
See "Managing Environment Variables in the Oracle Restart Configuration" for more information.
You can also use Oracle Enterprise Manager Database Control (Database Control) to start a database managed by Oracle Restart. Both the SRVCTL and Database Control methods are described in the following sections:
Starting and Stopping Components Managed by Oracle Restart with SRVCTL
Starting a Database Managed by Oracle Restart with Oracle Enterprise Manager
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:
Prepare to run SRVCTL as described in "Preparing to Run SRVCTL".
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-8. 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 -d dbcrm
Example 4-18 Starting a Database NOMOUNT
This example starts the database instance without mounting the database:
srvctl start database -d dbcrm -o 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 -l 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 -d dbcrm -s "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 -g "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 (-o
) 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 -d 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 -d dbcrm -o abort
See Also:
The SRVCTL start commandWith Oracle Enterprise Manager Database Control (Database Control), you can use Oracle Restart to start a database.
To start a database managed by Oracle Restart with Oracle Enterprise Manager:
Access the Database Home page for the desired database instance.
See "Accessing the Database Home Page" in Oracle Database 2 Day DBA for instructions.
Click Startup.
The Startup/Shutdown Credentials page appears.
Enter credentials as follows:
Enter the host computer credentials for the user who installed the database Oracle home.
Enter the database credentials consisting of the user name SYS
and the password that you assigned to SYS
during the installation.
In the Connect As list, choose the value SYSOPER
.
(Optional) Select the Save as Preferred Credential option if you want these credentials to be automatically filled in for you the next time that this page appears.
Click OK.
The Select Startup Type page appears.
To start the database with Oracle Restart, select Start database along with dependent resources.
This ensures that resources on which the database depends, such as the Oracle Automatic Storage Management instance, are successfully started before the database is started.
Click OK.
A confirmation page appears.
Click Yes.
The Startup/Shutdown: Activity Information page appears, indicating that the database is being started up. When startup is complete, the Login page appears.
Log in to the database (and to Database Control).
The Database Home page appears indicating that the database instance status is Up.