Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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.
Arturo Galbiati
Esteemed Contributor

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

hi,
I suggest:
alter system checkpoint
shutdown abort
startup restrict
shutdown immediate

In this way you will baort all teh sessions connected but making a sutdown immediate as wel you will clean all the momeries, falf, etc.

Of course you must ahve a user with restricted session privilege to perform this.

HTH,
Art
Nguyen Anh Tien
Honored Contributor

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

check by issuing command:
#ps -ef|grep ora
HTH
tienna
HP is simple
Frank de Vries
Respected Contributor

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

Thanks for input,
it helped me to build the complete picture,
and not to overlook the obvious.
Look before you leap