Home » Infrastructure » Unix » database not shutting down
database not shutting down [message #139484] Wed, 28 September 2005 04:37 Go to next message
tarundua
Messages: 1080
Registered: June 2005
Location: India
Senior Member

I have a sun server , solaris 5.9 , RAM - 8GB hosting Oracle9i with database size 15GB.

I gave shutdown immediate command 1 hr ago and still the database is shutting down .

see this
 
SQL> set time on
04:38:16 SQL> shutdown immediate;

 


no progress since 1 hour.


Now when i tried to logon from another session i got

 05:32:14 SQL> conn scott/tiger
ERROR:
ORA-01089: immediate shutdown in progress - no operations are permitted


Warning: You are no longer connected to ORACLE.
 


Its perfect because Oracle shutdown is in progress .
But i just want to know why its taking so much time ( almost 1 hr passed and not shutdown yet)

I checked this also

dogmatix:SID=testdb=>ps -e -o pcpu -o pid -o user -o args | sort -k 1 | tail -21r
%CPU   PID     USER COMMAND
 0.5  3593   oracle ora_smon_testdb
 0.5  3587   oracle ora_dbw0_testdb
 0.2     3     root fsflush
 0.1  3651   oracle sort -k 1
 0.1  3650   oracle ps -e -o pcpu -o pid -o user -o args
 0.1  3589   oracle ora_lgwr_testdb
 0.0  3652   oracle tail -21r
 0.0  3625   oracle -ksh
 0.0  3601   oracle oracletestdb (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
 0.0  3595   oracle ora_reco_testdb
 0.0  3591   oracle ora_ckpt_testdb
 0.0  3585   oracle ora_pmon_testdb
 0.0  3582   oracle sqlplus
 0.0  3574   oracle -ksh
 0.0  3549     root -ksh
 0.0  3547     root /usr/lib/ssh/sshd
 0.0  3414     root -ksh
 0.0  3412     root /usr/lib/ssh/sshd
 0.0  1560     root /usr/lib/sendmail -bd -q15m
 0.0  1559    smmsp /usr/lib/sendmail -Ac -q15m


any help would be appreciated.

thanks & regards,
tarun
Re: database not shutting down [message #139491 is a reply to message #139484] Wed, 28 September 2005 05:14 Go to previous messageGo to next message
somnath1974
Messages: 15
Registered: July 2005
Junior Member
Hi,
Could you check out your alert log once ? Something might be logged there.


Regards,
Somnath
Re: database not shutting down [message #139493 is a reply to message #139491] Wed, 28 September 2005 05:19 Go to previous messageGo to next message
tarundua
Messages: 1080
Registered: June 2005
Location: India
Senior Member
hi somnath,

i fired "SHUTDOWN IMMEDIATE"

so as oracle says
Quote:


Shutting Down with the IMMEDIATE Option
Use immediate database shutdown only in the following situations:
n To initiate an automated and unattended backup
n When a power shutdown is going to occur soon
n When the database or one of its applications is functioning irregularly and you
cannot contact users to ask them to log off or they are unable to log off
To shut down a database immediately, use the SHUTDOWN command with the
IMMEDIATE option:
SHUTDOWN IMMEDIATE
Immediate database shutdown proceeds with the following conditions:
n No new connections are allowed, nor are new transactions allowed to be
started, after the statement is issued.
n Any uncommitted transactions are rolled back. (If long uncommitted
transactions exist, this method of shutdown might not complete quickly,
despite its name.)
n Oracle does not wait for users currently connected to the database to
disconnect. Oracle implicitly rolls back active transactions and disconnects all
connected users.
The next startup of the database will not require any instance recovery procedures.



shutdown immediate will implicitly disconnect all the connected users.


This is the output from alert file since i fired shutdown

Quote:



Wed Sep 28 04:38:34 2005
Shutting down instance: further logons disabled
Wed Sep 28 04:51:35 2005
Thread 1 advanced to log sequence 166
Current log# 1 seq# 166 mem# 0: /data1/u01/app/oracle/oradata/testdb/redo/redo01.log
Wed Sep 28 04:56:41 2005
Shutting down instance (immediate)
License high water mark = 6
All dispatchers and shared servers shutdown
Wed Sep 28 04:56:44 2005
ALTER DATABASE CLOSE NORMAL
Wed Sep 28 05:01:54 2005
Waiting for smon to disable tx recovery.
Wed Sep 28 05:30:49 2005
Thread 1 advanced to log sequence 167
Current log# 2 seq# 167 mem# 0: /data1/u01/app/oracle/oradata/testdb/redo/redo02.log
Wed Sep 28 06:10:01 2005
Thread 1 advanced to log sequence 168
Current log# 3 seq# 168 mem# 0: /data2/ora_datafile/redo/redo03.log




thanks for your time,
tarun

[Updated on: Wed, 28 September 2005 05:26]

Report message to a moderator

Re: database not shutting down [message #139499 is a reply to message #139493] Wed, 28 September 2005 06:25 Go to previous messageGo to next message
tarundua
Messages: 1080
Registered: June 2005
Location: India
Senior Member

I waited for approx 2 hrs and then i killed all the processes belonging to Oracle manually .

And i really dont know the reason behind it but now its just taking less than 1 minute to startup and shutdown.

Anyways the issue is solved but if anybody can explain me the reason than i would be really greatful.

Note: No other user was connected to the database at that time.

regards,
tarun

[Updated on: Wed, 28 September 2005 06:25]

Report message to a moderator

Re: database not shutting down [message #139520 is a reply to message #139499] Wed, 28 September 2005 08:05 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Expected Behaviour and in accordance to your own quote from documentation.
If you look at the logs closely, you can see what is happening.

Shutdown immediate is NEVER immediate.
shutdown immediate causes all uncommitted transactions to be rolled
back.SO this rollback, may take some time~!.
ANd you also see your SMON is waiting for recovery ( is this 8i?)
Re: database not shutting down [message #139522 is a reply to message #139520] Wed, 28 September 2005 08:14 Go to previous messageGo to next message
tarundua
Messages: 1080
Registered: June 2005
Location: India
Senior Member

hi mahesh,

this is not 8i , its 9i (9.2) .

And i really dnt know why it had happened . There was no other user on the database at that time except me.

thanks & regards,
tarun
Re: database not shutting down [message #139527 is a reply to message #139522] Wed, 28 September 2005 08:56 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Quote:

Wed Sep 28 05:01:54 2005
Waiting for smon to disable tx recovery.
Wed Sep 28 05:30:49 2005

SMON is taking time to clean up temp tablespace.


Re: database not shutting down [message #143087 is a reply to message #139527] Wed, 19 October 2005 01:11 Go to previous messageGo to next message
hexmanju
Messages: 78
Registered: September 2005
Location: MUMBAI
Member
Hi

Even i experienced this problem in my database....

But i killed the process to get the DB shutdown...


Thanks and Regards
Manju
Re: database not shutting down [message #149327 is a reply to message #139522] Thu, 01 December 2005 04:27 Go to previous messageGo to next message
rushikesh
Messages: 6
Registered: December 2005
Location: Ahemedabad
Junior Member

Hi Tarun,

1st one sql> exit and then lnsrctl stop and then type lnsrctl start ..... go into sql> prompt and type shutdown immediate...
Try it u can be success....

Warm Rgds,
Rushikesh Rana
Re: database not shutting down [message #149328 is a reply to message #149327] Thu, 01 December 2005 04:33 Go to previous message
tarundua
Messages: 1080
Registered: June 2005
Location: India
Senior Member

Hi Rushikesh,

As you can see, this issue was resolved on 28th of september. Laughing

Anyways thanks,
Tarun
Previous Topic: Help me ...spent a long time on this issue
Next Topic: how to load multiple files into 1 table using unix script
Goto Forum:
  


Current Time: Mon Nov 25 10:53:56 CST 2024