|
Re: how to know database's status in command-line mode? [message #59469 is a reply to message #59460] |
Mon, 24 November 2003 09:13 |
Thiru
Messages: 1089 Registered: May 2002
|
Senior Member |
|
|
Since you didnt preclude the use of sqlplus wrapped inside a shell script executed from command line, thats what I am going to suggest !
Query v$instance to get the instance status(Started,Mounted,Open). When the instance is down,you will probably get an error messagee which you can interpret as 'Down' .
Also,if you are in Unix, you can do a couple of things
ps -ef|grep smon
sysresv
to see if the instance is up(but wont tell you any more details about database status(ie mounted,open)).
For eg )
$sysresv|grep DEV08|grep -v IPC
Oracle Instance alive for sid "DEV08"
But I use v$instance.
-Thiru
|
|
|
|