How to check a database is closed on W2000
I would like to know if there is a way of checking using a script that a database is definately shutdown.
This is quite easy on Unix (ps -ef | grep smon) but I'm unable to find the equivalent on W2000.
I looked for the file which starts "ik" that is created on Unix everytime an instance is started but have failed to find one of those files on the W2000 machine.
I've looked at views, etc that I could call from svrmgrl, but they all need the instance to be at the nomount stage atleast.
Any suggestions would be very helpful.
To check for Oracle running in Windows you will neeed install some utilitity to check for threads, you will find one in www.sysinternals.com, and for Win2k MS offers one to download in MS technet, AFAIK.
stop the Oracle services, if it's not started then the database is not available
Alert.log, will say in what state the DB is?
or even you could check for process ORACLE.exe..
of course you cant be for sure that if Oracle.exe is running, DB is UP...coz Oracle Process are considered/alloted as threads rather than seperate processes as in UNIX and so(I blv).
But other ways round is true, that if Oracle.exe isnt running than DB is suerly down. ( I assume only 1 instance running )
Better if you have WIN resource kit, by which you will be able to know if the threads ( oracle background processes ).
Havent used it, but read it in Microsoft Sites.
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
Thanks for the help. I'll try these out and see how I get on.
Click Here to Expand Forum to Full Width