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: Mladen Gogala <mladen_at_wangtrading.com>
Date: Tue, 9 Mar 2004 15:57:38 -0500
Message-ID: <20040309205738.GA22261@mladen.wangtrading.com>


Perl and DBI are the first things that comes to mind. Format of the /etc/oratab is:
$ORACLE_SID:$ORACLE_HOME:{Y|N|M} You would set $ENV{"ORACLE_SID"} and $ENV{"ORACLE_HOME"} to the values from oratab (split /:/), then do DBI->connect("dbi:Oracle:$sid", "scott","tiger",\%attr) and check for errors. Attributes that should be changed are RaiseError and PrintError.

On 03/09/2004 03:29:38 PM, Michael Milligan wrote:
> Hi,
>
> 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?
>
> Thanks,
>
> Mike
>
>
> 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
> -----------------------------------------------------------------
>



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 Tue Mar 09 2004 - 14:54:33 CST

Original text of this message

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