0

I have Oracle XE 10.0.2 installed on my development system.

Recently I have been unable to restart it:

$ sudo /etc/init.d/oracle-xe stop
Shutting down Oracle Database 10g Express Edition Instance.
Stopping Oracle Net Listener.

$ sudo /etc/init.d/oracle-xe start
Starting Oracle Net Listener.
Starting Oracle Database 10g Express Edition Instance.

$ sqlplus 

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Feb 4 19:54:53 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Enter user-name: hr
Enter password: 
ERROR:
ORA-01089: immediate shutdown in progress - no operations are permitted

So I tried killing off all oracle processes by hand:

$ sudo killall oracle tnslsnr

This kills the processes (they are no longer listed in ps). I then try starting Oracle again:

$ sudo /etc/init.d/oracle-xe start
Starting Oracle Net Listener.
Starting Oracle Database 10g Express Edition Instance.

SQL*Plus gives the same error.

/usr/lib/oracle/xe/app/oracle/admin/XE/bdump/alert_XE.log says:

Starting Oracle Database 10g Express Edition Instance.
Tue Feb  4 19:59:30 2014
Starting ORACLE instance (normal)

I have not reconfigured Oracle recently, but I have shut it down hard (power off), so it may be in a inconsistent state that I need to force it to recover from.

1

A complete guide on how to get Oracle on GNU/Linux unstuck from ORA-01089 is here.

The idea is basically to log in to Oracle as sysdba and issue a shutdown command (oracle user in OS is the standard in this example from the link provided):

root# sudo su - oracle
oracle$ sqlplus
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Feb 9 15:16:09 2014
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Enter user-name: / as sysdba
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> shutdown abort
ORACLE instance shut down.

In a single line:

echo shutdown abort | sudo su - oracle -c "sqlplus / as sysdba"

If this does not work try some of the spells on https://dba.stackexchange.com/questions/15888/oracle-shutdown-method and finish up with:

/etc/init.d/oracle-xe stop
/etc/init.d/oracle-xe start
  • 2
    Would you consider improving your question by providing answer in your post? You basically gave link. If it dies, the answer is lost. – MatthewRock Aug 26 '15 at 8:58
0

If sending a simple TERM signal does not kill a process (kill by default, sends a process a TERM signal, which is a way of politely asking a process to close and save data and/or files in use and end), one can then send a KILL signal to a process, e.g.:

sudo killall -9 oracle tnslsnr

Only do this after sending the process a TERM signal and giving it a reasonable about of time to close things down (it could possibly corrupt databases and what not, but if it's been 10 minutes, maybe the program has just hung)


OK, a quick Google search of ORA-01989 shows the following discussion:

https://community.oracle.com/thread/2523811?tstart=0

Where someone points out that:

ORA-01089: immediate shutdown in progress - no operations are permitted --> happends when you connect to database with a current user, not as sysdba.

And they say this error can be fixed by logging in to the database as the sysdba account and either shutting down or bringing up the Oracle database.

(No, I have never administered an Oracle database. But my experience with error codes is the best way to get help from the all-knowing Google is by Googling the exact error code or message)

  • The processes die (i.e. ps does not see neither oracle nor tnslsnr anymore), so the processes are not hung. – Ole Tange Feb 5 '14 at 5:45
  • I have updated my answer – samiam Feb 5 '14 at 6:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.