From oracle-l-bounce@freelists.org Wed Mar 10 07:25:52 2004 Return-Path: Received: from air189.startdedicated.com (root@localhost) by orafaq.com (8.11.6/8.11.6) with ESMTP id i2ADPqf01674 for ; Wed, 10 Mar 2004 07:25:52 -0600 X-ClientAddr: 206.53.239.180 Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180]) by air189.startdedicated.com (8.11.6/8.11.6) with ESMTP id i2ADPno01652 for ; Wed, 10 Mar 2004 07:25:49 -0600 Received: from turing (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id DB480394FBF; Wed, 10 Mar 2004 08:22:40 -0500 (EST) Received: with ECARTIS (v1.0.0; list oracle-l); Wed, 10 Mar 2004 08:21:29 -0500 (EST) X-Original-To: oracle-l@freelists.org Delivered-To: oracle-l@freelists.org Received: from mx10.radisys.com (mx10.radisys.com [206.102.10.36]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id C1E99394F54 for ; Wed, 10 Mar 2004 08:21:26 -0500 (EST) Received: by mx10.radisys.com (Postfix, from userid 5) id EA95F142E56; Wed, 10 Mar 2004 05:26:19 -0800 (PST) Received: from UNKNOWN(206.103.52.194), claiming to be "dcblackberry.radisys.com" via SMTP by mx10, id smtpdAAAGeST1_; Wed Mar 10 05:26:08 2004 To: oracle-l@freelists.org Subject: Re: Unix script to check database status MIME-Version: 1.0 X-Mailer: Lotus Notes Release 5.0.10 March 22, 2002 Message-ID: From: Jared.Still@radisys.com Date: Wed, 10 Mar 2004 05:26:00 -0800 X-MIMETrack: Serialize by Router on DCBlackBerry/Radisys_Corporation/US(Release 5.0.12 |February 13, 2003) at 03/10/2004 05:22:54 AM, Serialize complete at 03/10/2004 05:22:54 AM Content-Type: multipart/alternative; boundary="=_alternative 0049B4B388256E53_=" X-archive-position: 297 X-ecartis-version: Ecartis v1.0.0 Sender: oracle-l-bounce@freelists.org Errors-To: oracle-l-bounce@freelists.org X-original-sender: Jared.Still@radisys.com Precedence: normal Reply-To: oracle-l@freelists.org X-list: oracle-l --=_alternative 0049B4B388256E53_= Content-Type: text/plain; charset="us-ascii" You use good HW and maintain it like any other production server. chris@thedunscombes.f2s.com Sent by: oracle-l-bounce@freelists.org 03/10/2004 12:58 AM Please respond to oracle-l To: oracle-l@freelists.org cc: Subject: Re: Unix script to check database status Jared, I agree doing it from a single server is more efficient and is my general approach on management / admin. But there's always the issue of what happens when the "management / admin server" is down. (Having a 2nd one as backup is nice but often the money doesn't run that far). Cheers, Chris Quoting Jared.Still@radisys.com: > There are at least two drawbacks to this method. > > 1) You must run the script from the server, so that your scripts must run > on every database server. It is much more efficient to do this from a > single server. > > 2) related to 1. This does not test sqlnet. > > Just food for thought. > > Jared > > > > > > > "Ryan" > Sent by: oracle-l-bounce@freelists.org > 03/09/2004 02:23 PM > Please respond to oracle-l > > > To: > cc: > Subject: Re: Unix script to check database status > > > ls -l | grep pmon > > then cut out the database name. You will also want to attempt to log in as > follows > > sqlplus -s / << EOF > $TEMPFILE > select 1 > from dual; > EOF > if [ ! $? -eq 0]; them > send $TEMPFILE to yourself in an email. > fi > delete $TEMPFILE > You are probably going to want to start creating an architecture for this, > since as time goes on you will want to add more and more stuff(such as > checking the alert log, testing queries and query plans, segments and > tablespace stuff as well... ) > > So I recommend the following > > 1. scripts to create a tempfile, delete a tempfile, and concatenate stuff > into your tempfile(these are like 5 lines each). > 2. A wrapped email script with a flag for success, failure, and warning > 3. An email list with emails of who gets what. For example > > DATABASE CHECK [1] michael@company.com ryan@company.com > > Then your scripts can grep for that with the status(1 is for failure) and > send the appropriate email. > > From here you can plug into your architecture. This will make your life > easier. > ----- Original Message ----- > From: "Michael Milligan" > To: > Sent: Tuesday, March 09, 2004 3:29 PM > Subject: Unix script to check database status > > > > 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@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@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 > ----------------------------------------------------------------- > > > Chris Dunscombe chris@thedunscombes.f2s.com ------------------------------------------------- Everyone should have http://www.freedom2surf.net/ ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request@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 ----------------------------------------------------------------- --=_alternative 0049B4B388256E53_= Content-Type: text/html; charset="us-ascii"
You use good HW and maintain it like any other production server.



chris@thedunscombes.f2s.com
Sent by: oracle-l-bounce@freelists.org

 03/10/2004 12:58 AM
 Please respond to oracle-l

       
        To:        oracle-l@freelists.org
        cc:        
        Subject:        Re: Unix script to check database status



Jared,

I agree doing it from a single server is more efficient and is my general
approach on management / admin. But there's always the issue of what happens
when the "management / admin server" is down. (Having a 2nd one as backup is
nice but often the money doesn't run that far).

Cheers,

Chris


Quoting Jared.Still@radisys.com:

> There are at least two drawbacks to this method.
>  
> 1) You must run the script from the server, so that your scripts must run
> on every database server.  It is much more efficient to do this from a  
> single server.
>  
> 2) related to 1.  This does not test sqlnet.
>  
> Just food for thought.
>  
> Jared
>  
>  
>  
>  
>  
>  
> "Ryan" <ryan.gaffuri@cox.net>
> Sent by: oracle-l-bounce@freelists.org
>  03/09/2004 02:23 PM
>  Please respond to oracle-l
>  
>  
>         To:     <oracle-l@freelists.org>
>         cc:  
>         Subject:        Re: Unix script to check database status
>  
>  
> ls -l | grep pmon
>  
> then cut out the database name. You will also want to attempt to log in as
> follows
>  
> sqlplus -s / << EOF > $TEMPFILE
>    select 1
>    from dual;
> EOF
> if [ ! $? -eq 0]; them
>    send $TEMPFILE to yourself in an email.
> fi
> delete $TEMPFILE
> You are probably going to want to start creating an architecture for this,
> since as time goes on you will want to add more and more stuff(such as
> checking the alert log, testing queries and query plans, segments and
> tablespace stuff as well... )
>  
> So I recommend the following
>  
> 1. scripts to create a tempfile, delete a tempfile, and concatenate stuff
> into your tempfile(these are like 5 lines each).
> 2. A wrapped email script with a flag for success, failure, and warning
> 3. An email list with emails of who gets what. For example
>  
> DATABASE CHECK [1] michael@company.com ryan@company.com
>  
> Then your scripts can grep for that with the status(1 is for failure) and
> send the appropriate email.
>  
> From here you can plug into your architecture. This will make your life
> easier.
> ----- Original Message -----  
> From: "Michael Milligan" <Michael.Milligan@ingenix.com>
> To: <oracle-l@freelists.org>
> Sent: Tuesday, March 09, 2004 3:29 PM
> Subject: Unix script to check database status
>  
>  
> > 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@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@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
> -----------------------------------------------------------------
>  
>  
>  


Chris Dunscombe

chris@thedunscombes.f2s.com

-------------------------------------------------
Everyone should have http://www.freedom2surf.net/
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@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
-----------------------------------------------------------------


--=_alternative 0049B4B388256E53_=-- ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request@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 -----------------------------------------------------------------