Operating System - HP-UX
1748279 Members
4090 Online
108761 Solutions
New Discussion юеВ

How to detect Oracle db is in process of shutting down

 
SOLVED
Go to solution
Frank de Vries
Respected Contributor

How to detect Oracle db is in process of shutting down

I would like to know if there is a nice
way to check if db is in process of shutting
down.

I know of one , that is just trying to
log in and receive the ORA error.

But I would like to find other ways as well
for example check an internal table to see what
the status is ?

Any other 'good' ideas of course welcome
Look before you leap
12 REPLIES 12
Bharat Katkar
Honored Contributor

Re: How to detect Oracle db is in process of shutting down

If that is under the MCSG package control you can always have a look at package log file.

# tail -f /etc/cmcluster/pkgxx/logfile

Regards,
You need to know a lot to actually know how little you know
Luk Vandenbussche
Honored Contributor

Re: How to detect Oracle db is in process of shutting down

Hi Frank,

Check the alert.log of your instance.

Normaly it is in $ORACLE_BASE/admin/$instance/bdump

The name can also be alert_instance.log
Frank de Vries
Respected Contributor

Re: How to detect Oracle db is in process of shutting down

Handy points
I found this in the log


Shutting down instance (immediate)
License high water mark = 17
Sun Feb 5 10:20:23 2006
SHUTDOWN: waiting for logins to complete.

I am puzzled because normally on sunday
there is no activity,
so why is it waiting for logins to complete ?
Look before you leap
TwoProc
Honored Contributor

Re: How to detect Oracle db is in process of shutting down

Frank,

Old, idle connections will do that to you, as well as "up" Apache servers with plsql components for example. Processes that sit around do queue management will regularly have to wake up every so often and see if there is new work process, etc. so that they will have to remain connected.

A full Oracle system with nothing going on rarely has absolutely nothing going on...
We are the people our parents warned us about --Jimmy Buffett
Arunvijai_4
Honored Contributor

Re: How to detect Oracle db is in process of shutting down

Hi Frank,

Will this be helpful ?

http://forums.dbasupport.com/forums/showpost.php?p=223460&postcount=3

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Simon Wickham_6
Regular Advisor

Re: How to detect Oracle db is in process of shutting down

Hi,

Simply tail your alert log.

Regards,
Simon
rariasn
Honored Contributor

Re: How to detect Oracle db is in process of shutting down

Hi Frank,

more $ORACLE_LOG/$ORACLE_SID/alert*.log

CONECTS=$(ps -ef|grep -i oracle$ORACLE_SID|grep LOCAL=NO|grep -v grep|awk '{print $2}')
kill -9 $CONECTS

ran
Jakes Louw
Trusted Contributor

Re: How to detect Oracle db is in process of shutting down

I think that "select * from V$STATUS" might do the job (I think that's the view in question: I don't have a Data Dict listing with me).
Trying is the first step to failure - Homer Simpson
Eric Antunes
Honored Contributor
Solution

Re: How to detect Oracle db is in process of shutting down

Hi Frank,

Yes there is:

SQL>select shutdown_pending from v$instance;

Best Regards,

Eric Antunes
Each and every day is a good day to learn.