Shutdown/Startup Oracle

11 Jan 2009

Some notes on shutting down and starting up Oracle, taken from an email.

Please be corrected in Note Section if you do need to do abort shutdown.
After abort shutdown, we do need to startup and shutdown database again.
Then second shutdown will bring database down cleanly.
After that you can backup database files.
Logon UNIX as "oracle"
================
TO STOP DATABASE
================
1. Invoke SQL*Plus
$ sqlplus " / as sysdba"
SQL > shutdown immediate;
.
.
Shutdown messages
.
Database closed.
SQL > exit;
Note : If there are connections to DB, Oracle may take some time to rollback each connection's job and then close the session. Once all connections are disconnected, it will bring database down.
During shutting down, Oracle will write message to in log file.
Please tail the file to see progression messages.
tail -f /opt/oracle/db_1020/admin/psms01/bdump/alert_psms01.log
If database is not down at reasonable time, you can terminate command by Ctrl+C, then
SQL> exit;
$ sqlplus " / as sysdba"
SQL > shutdown abort;
SQL > exit;
$ sqlplus " / as sysdba"
SQL > shutdown immediate;
SQL > exit;
The above steps should be done as the last choice and only when
database is not down as normal.
2. Shutdown Database Listener
$ lsnrctl stop
3. Verify Oracle Processes
$ ps -ef |grep pmon
$ ps -ef |grep tnslsnr
No such process shown if step 1 & 2 are successfully done.
=================
TO START DATABASE
=================
1. Start Database Listener
$ lsnrctl start
2. Invoke SQL*Plus
$ sqlplus " / as sysdba"
SQL > startup;
.
.
Starting up messages
.
Database open.
SQL > exit;
3. Verify Oracle Processes
$ ps -ef |grep pmon
$ ps -ef |grep tnslsnr
One process is expected for each 'ps' command.
4. Test Connnection
$ sqlplus " / as sysdba"
SQL > select instance_name, host_name,
to_char(startup_time, 'DD-MON-YY HH24:MI'), status
from v$instance;
Status must be OPEN.
comments powered by Disqus

  « Previous: Next: »