Oracle Startup & Shutdown
Version 11.2.0.3
 
Database Startup
What do they do?
NOMOUNT background processes are started based on reading the spfile
MOUNT control files are opened and read
OPEN data files are opened
Startup <options> STARTUP [FORCE][RESTRICT][NOMOUNT][MIGRATE][QUIET]
[PFILE=<file_name>]
[MOUNT [EXCLUSIVE] <database_name>x |
OPEN <READ {ONLY | WRITE [RECOVER]} | RECOVER>
<database_name>]
SQL> STARTUP
Startup Force SQL> STARTUP FORCE
Startup Nomount SQL> STARTUP NOMOUNT
Startup Mount SQL> STARTUP MOUNT
Startup Mount Exclusive Deprecated .. now use STARTUP MOUNT
Startup Open SQL> STARTUP OPEN
Startup Migrate SQL> STARTUP MIGRATE
Startup Restricted SQL> STARTUP RESTRICT
Startup <upgrade> STARTUP [PFILE=<file_name>]{UPGRADE | DOWNGRADE} [QUIET]
SQL> STARTUP UPGRADE
 
Alter Database
Alter Database Mount SQL> ALTER DATABASE MOUNT
Alter Database Open SQL> ALTER DATABASE OPEN
 
Database Shutdown
Shutdown SHUTDOWN <ABORT | IMMEDIATE | TRANSACTIONAL[LOCAL]>
SQL> SHUTDOWN
Shutdown Normal (do not use this option) SQL> SHUTDOWN NORMAL
Shutdown Transactional SQL> SHUTDOWN TRANSACTIONAL
Shutdown Immediate (the default) SQL> SHUTDOWN IMMEDIATE
Shutdown Abort SQL> SHUTDOWN ABORT
 
Oracle Supplied Startup & Shutdown Scripts
Startup dbstart
Shutdown dbshut
 
System Hangs On Shutdown
Solution #1 SQL> alter system checkpoint;
SQL> shutdown abort
SQL> startup restrict
SQL> shutdown immediate
 
Oracle Services On Windows
Startup net start OracleService<SID>
c:\windows\system32 net start oracleserviceorabase
Shutdown net stop OracleService<SID>
c:\windows\system32 net stop oracleserviceorabase
Help net<error_msg_number>
c:\windows\system32 net help helpmsg

The syntax of this command is:

NET HELPMSG
message#

NET HELPMSG displays information about Windows network messages
(such as error, warning, and alert messages). When you type NET HELPMSG and
the 4-digit number of the Windows error (for example, NET2182),
Windows tells you about the message and suggests action you can take
to solve a problem.

message# Is the 4-digit number of the Windows message you need help
with. You don't need to type NET as part of the message number.
 
Oracle Services On Windows With Oradim
Start Oracle Service oradim -STARTUP
[-SID <side_name> | -ASMSID <sid> [-SYSPWD <password>]
[STARTTYPE <service_name | instance_name | service_name,instance_name]
[-PFILE <file_name> | -SPFILE]
$ORACLE_HOME\bin\oradim -STARTUP -SID orabase -STARTTYPE tstc -SPFILE
Stop Oracle Service oradim -SHUTDOWN
[-SID <side_name> | -ASMSID <sid> [-SYSPWD <password>]
[-SHUTTYPE <service_name | instance_name | service_name,instance_name]
[-SHUTMODE <normal | immediate | abort>
$ORACLE_HOME\bin\oradim -SHUTDOWN -SID orabase -SHUTMODE abort
 
Stopping Processes
When stop doesn't stop alter database close may fail for many reasons. Among them job queue processes, dbms_job, and advanced queueing.

SQL> ALTER DATABASE CLOSE;
alter database close
*
ERROR at line 1:
ORA-01093: ALTER DATABASE CLOSE only permitted with no sessions connected

col username format a20
col schemaname format a20
col osuser format a20
SELECT username, schemaname, osuser, status
FROM gv$session;

ALTER SYSTEM SET job_queue_processes = 0 SCOPE=MEMORY;

ALTER SYSTEM SET aq_tm_processes=0 SCOPE=MEMORY;

ALTER DATABASE CLOSE;
Force log files to be archived in preparation for media recovery startup mount;
alter database orabase archivelog;
alter system archive log start;
alter database open;
When testing startup scripts be sure you are mimicking the environment under which the script will actually run For example:

sh -x /etc/init.d/oracle start 
 
Related Topics
Database
ORADIM
System
 
Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2013 Daniel A. Morgan All Rights Reserved