Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Unix script to check database status

RE: Unix script to check database status

From: Michael Milligan <Michael.Milligan_at_ingenix.com>
Date: Thu, 11 Mar 2004 17:14:01 -0600
Message-ID: <BEB4912D93B5D24694F5231821555306014B9EDB@slc7-sstmsx1.pcl.ingenix.com>


I thought of that, too, but if the database can not get at least to a startup nomount state, this would fail. If the initsid.ora file got deleted, for example. Good idea though.

Thanks,

Mike

-----Original Message-----
From: Kevin Lange [mailto:klange_at_ppoone.com] Sent: Thursday, March 11, 2004 3:05 PM
To: 'oracle-l_at_freelists.org'
Subject: RE: Unix script to check database status

Why not simply write a query that gets ran by OS that selects the status and logins from v$instance. You should be able to parse that simple enough.

-----Original Message-----
From: Jacques Kilchoer [mailto:Jacques.Kilchoer_at_quest.com] Sent: Thursday, March 11, 2004 2:29 PM
To: oracle-l_at_freelists.org
Subject: RE: Unix script to check database status

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_at_dmc-it.com
>
> 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_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request_at_freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------


This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified that
any dissemination, distribution or copying of this e-mail is prohibited. If
you have received this e-mail in error, please notify the sender by replying
to this message and delete this e-mail immediately.
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request_at_freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Thu Mar 11 2004 - 17:35:30 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US