RE: Unix script to check database status

  • From: "Jacques Kilchoer" <Jacques.Kilchoer@xxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 11 Mar 2004 12:28:52 -0800

If you try a bogus userid/password and use the ORA-1017 as "proof" that the 
database is up, you wouldn't know if the database is in restricted session 
mode. (Something that has burned me before.) I personally think the best way 
for verifying that the database is up is to create a session (create a userid 
that only has "create session" privilege and use that for verification.

> -----Original Message-----
> testa@xxxxxxxxxx
> 
> Mike, make your script attempt to login into the database(even with a
> bogus userid/password),
> 
> you get a ORA-1017 invalid userid/password, you know the 
> database is up
> and you got a connection to it.
> 
> Joe
> 
> 
> > I have to write an HP-UX Korn shell script to check the status of 20
> > databases - up or down - and send an email if any are down. I'm a
> > relative newbie at Unix. I'm not asking anyone to "do it 
> for me", but
> > does anyone know of any scripts to check database status by 
> greping or
> > otherwise looking at the oratab or other file and checking 
> the status?
> >
> > Mike
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: