STARTUP AN INSTANCE
To start up an instance, use the following command:
STARTUP [FORCE] [RESTRICT] [PFILE=filename]
[OPEN [RECOVER][database]
|MOUNT
|NOMOUNT]
Note: This is not the complete syntax.
where:
- OPEN enables users to access the database
- MOUNT mounts the database for certain DBA activities but does not provide user access to the database
- NOMOUNT creates the SGA and starts up the background processes but does not provide access to the database
- PFILE=parfile enables a nondefault parameter file to be used to configure the instance
- FORCE aborts the running instance before performing a normal startup
- RESTRICT enables only users with RESTRICTED SESSION privilege to access the database
- RECOVER begins media recovery when the database starts
Initialization Parameter File
By default, when the database is started, the Oracle server looks in $ORACLE_HOME/dbs for an initialization parameter file. The Oracle server first attempts to read file spfilesid.ora and if not found then file initsid.ora. If neither file is located, an error message is received.
Automating Database Startup
On Unix Automating database startup and shutdown can be controlled by the entries in a special operating system file; for example, oratab in the /var/opt/oracle directory.
Troubleshooting
Attempting to start the Oracle Utilities without starting these services results in the following error message: ORA-12547: TNS: lost contact
Shutting Down the Database
Shut down the database to make operating system offline backups of all physical structures and to have modified static initialization parameters take effect.
To shut down an instance you must connect as SYSOPER or SYSDBA and use the following command:
SHUTDOWN [NORMAL | TRANSACTIONAL | IMMEDIATE | ABORT ]
Shutdown Normal
Normal is the default shutdown mode. Normal database shutdown proceeds with the following conditions:
• No new connections can be made.
• The Oracle server waits for all users to disconnect before completing the shutdown.
• Database and redo buffers are written to disk.
• Background processes are terminated, and the SGA is removed from memory.
• Oracle closes and dismounts the database before shutting down the instance.
• The next startup does not require an instance recovery.
Shutdown Transactional
A transactional shutdown prevents clients from losing work. A transactional database shutdown proceeds with the following conditions:
• No client can start a new transaction on this particular instance.
• A client is disconnected when the client ends the transaction that is in progress.
• When all transactions have finished, a shutdown immediately occurs.
• The next startup does not require an instance recovery.
Shutdown Immediate
Immediate database shutdown proceeds with the following conditions:
• Current SQL statements being processed by Oracle are not completed.
• The Oracle server does not wait for users currently connected to the database to disconnect.
• Oracle rolls back active transactions and disconnects all connected users.
• Oracle closes and dismounts the database before shutting down the instance.
• The next startup does not require an instance recovery.
WARNING!!!
It can be dangerous when you use Shutdown (SHUTDOWN NORMAL) in intensive working databases which practically never stops. Because, in any type of SHUTDOWN new connections are not allowed even for SYSDBA. That means SYSDBA will bind himself and even can not do ALTER SYSTEM KILL SESSION 'SID,SERIAL#'; Only thing will leave to beg on the knee to System Administrator to do something.
No comments:
Post a Comment