Saturday, April 27, 2013

Procedure - Startup and Stopping Oracle Database - Oracle Support Note ID 1020192.6


The Startup Procedure

There are three stages in starting an Oracle database:

· Start the instance · Mount the database · Open the database You can control which stage by issuing different options on the STARTUP command.

STARTUP NOMOUNT

This will only start the Oracle instance. Oracle reads the initialization parameter file (init.ora) to determine where the control files are located, how large to create the System Global Area 
(SGA), and what background processes to create.When the instance is started, you will receive notification and a listing of SGA memory structures and sizes:

ORACLE instance started.
Total System Global Area                  56011696 bytes
Fixed Size                                   52144 bytes
Variable Size                             51785728 bytes
Database Buffers                           4096000 bytes
Redo Buffers                                 77824 bytes
 

STARTUP MOUNT

This command starts the instance and mounts the database without opening it. Oracle reads control files for information about the data files and redo logs, but doesn't open the files. This isrequired when performing maintenance operations such as renaming datafiles, altering redo logs or enabling archiving. In addition to seeing the SGA listing, you will see "Database mounted."

STARTUP

This command starts the instance, then mounts and opens the database. The database opens online datafiles and online redo logs, and usually will acquire one or more rollback segments. 
You will see "Database Open" when the database is ready for normal database operations.  


Note : If you use either STARTUP NOMOUNT or STARTUP MOUNT, you must use the ALTERDATABASE command to proceed opening the database.  For example, from the  NOMOUNT position (i.e., instance is started, but database is not mounted),you will need to issue two 
commands:

ALTER DATABASE MOUNT;
ALTER DATABASE OPEN;

From the MOUNT state, you will only have to issue ALTER DATABASE OPEN.


There are other options you can specify at startup:


STARTUP RESTRICT

The database will be opened, but only privileged users (users with the DBA role granted) can use the database.

STARTUP FORCE

This command does a combination of shutdown abort and startup.  
Use this only when experiencing problems in shutting down or starting the database.
 


 

The Shutdown Procedure

There are four different shutdown options:

SHUTDOWN NORMAL

This is the default option therefore, you can issue SHUTDOWN, and your database will be shutdown NORMAL. No new connections are allowed after the statement is issued.  
Before the database is shutdown, Oracle waits for all currently connected users to disconnect    from the database.  The next startup of the database will not  require any instance recovery.  
 

SHUTDOWN IMMEDIATE

This option is used when you want to shutdown quickly, but still allow the database to shutdown cleanly. Current SQL statements being processed by Oracle are terminated immediately.  
Any uncommitted transactions are rolled back.  
(If long uncommitted transactions exist, the shutdown might not complete as quickly.)  
Oracle does  not wait for users to disconnect; it implicitly rolls back active transactions and       disconnects all connected users.  


SHUTDOWN TRANSACTIONAL

This option is only available in version 8.1.X. Use this option when you want to perform a planned shutdown while allowing active transactions to complete.  
Any new connections or transactions will be denied.  After all active transactions complete, the database will be shutdown as if an IMMEDIATE option  was used.  


SHUTDOWN ABORT

This option should only be used as a last resort. Use if: · The database is functioning irregularly and you cannot do a shutdown normal or shutdown immediate. · You need to shutdown the database instantaneously. · You experience problems starting the database instance. All current client SQL statements being processed will immediately terminate.  
Any uncommitted transactions will not be rolled back.  
Oracle does not wait for users currently connected to the database to disconnect, 
but will disconnect all connected users. 

The next STARTUP of the database will require instance recovery; therefore, 
the next startup may take longer than usual.

No comments:

Post a Comment