Starting and Shutting Down a Database Using Services
Learn how to start and shut down a database using services.
You can start or shut down Oracle Database by starting or stopping the service OracleServiceSID in the Control Panel. Starting OracleServiceSID is equivalent to using the STARTUP command or manually entering:
C:\> oradim -STARTUP -SID SID [-STARTTYPE srvc | inst | srvc,inst] [-PFILE
filename | -SPFILE]
Stopping OracleServiceSID is equivalent to using the SHUTDOWN command or manually entering:
C:\> oradim -SHUTDOWN -SID SID [-SHUTTYPE srvc | inst | srvc,inst] [-SHUTMODE
normal | immediate | abort]
You can enable starting and stopping Oracle Database through OracleServiceSID by setting registry parameters.
Setting Registry Parameters
To start or stop Oracle Database through Oracle Database services, set the following registry parameters to the indicated values:
-
When set to
true, the default value, this parameter causes Oracle Database to start whenOracleServiceSIDis started. -
ORA_SID_PFILEThis parameter sets the full path to the initialization parameter file. If this entry is not present, then ORADIM tries to start the database with an
SPFILEorPFILEfromORACLE_HOME\database. -
ORA_SHUTDOWNWhen set to
true, this parameter enables the selected instance of Oracle Database to be shut down whenOracleServiceSIDis stopped. This includes any database in the current Oracle home. The default value isfalse. -
ORA_SID_SHUTDOWNWhen set to
true, the default value, this parameter causes the instance of Oracle Database identified by theSIDvalue to shut down whenOracleServiceSIDis stopped manually—using either the Control Panel or Net stop command.Note:
If
ORA_SHUTDOWNorORA_SID_SHUTDOWNis set tofalse, then manually shutting downOracleServiceSIDstill shuts down Oracle Database. But it is an abnormal shutdown, and Oracle does not recommend it.
The following two registry parameters are optional:
-
ORA_SID_SHUTDOWNTYPEThis parameter controls database shutdown mode. Set it to
a(abort),i(immediate), orn(normal). The default mode isi(immediate) if you do not set this parameter. -
ORA_SID_SHUTDOWN_TIMEOUTThis parameter sets the maximum time to wait before the service for a particular
SIDstops.
The registry location of these required and optional parameters are determined by the number of Oracle home directories on your computer. If you have only one Oracle home directory, then these parameters belong in:
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0
If you have multiple Oracle home directories, then these parameters belong in:
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEID
The variable ID is incremented for each additional Oracle home directory on your computer.
Note:
If you use ORADIM to create or edit instances, then it automatically sets the relevant registry parameters to their appropriate values.
Starting or Stopping OracleServiceSID from the Control Panel
Related Topics
Parent topic: Administering a Database on Windows