« RMAN - restoring tablespaces/datafiles | Main
Sunday
Nov212010

Help! Oracle database won't shut down

The other day I'm trying to shut down my Oracle database and it *will not* go down gracefully.  I'm loathe to pull the plug on the server, so what's a dba to do?

  1. Stop the listener - you can at least prevent others from connecting to the instance that you're trying to shut down:  bash-3.00$ lsnrctl stop
  2. Get a list of processes hitting the database.  You'll need that before you start killing them off one by one:  bash-3.00$ ps -eaf|grep LOCAL
  3. The output from step two will have the processid in the second column.  Jot a few down and then start to
  4. Kill the processes.  Take the second column's output from step #2 and execute the following:  bash-3.00$ kill -9 396 - where "396" is the processid you wish to kill.
  5. Enter into SQLPlus and connect as SYSDBA:  SQL> conn /as sysdba - you'll receive "Connected to an idle instance"
  6. Shutdown the database via SQL> shutdown immediate You may be given the following:

ORA-24324: service handle not initialized
ORA-24323: value not allowed
ORA-01090: shutdown in progress - connection is not permitted

    7. Reconnect to SQLPlus via sysdba

    8. Execute a startup force command.

    9. Don't forget to start the listener back up

 

The whole gut-wrenching thing may look like this:

SQL> conn /as sysdba
Connected to an idle instance.
SQL> shutdown immediate
ORA-24324: service handle not initialized
ORA-24323: value not allowed
ORA-01090: shutdown in progress - connection is not permitted
SQL> conn /as sysbda
SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where ::= [/][@] | /
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> shutdown immediate
ORA-24324: service handle not initialized
ORA-24323: value not allowed
ORA-01090: shutdown in progress - connection is not permitted
SQL> startup
ORA-01031: insufficient privileges
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup force pfile='/u01/app/oracle/product/10.2.0/db_1/dbs/Tallarico.ora' force nomount;
ORACLE instance started.

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>