Path: news.easynews.com!easynews!peer1-sjc1.usenetserver.com!usenetserver.com!pd2nf1so.cg.shawcable.net!residential.shaw.ca!news1.calgary.shaw.ca.POSTED!not-for-mail
Message-ID: <3C3293C3.22286CD5@shaw.ca>
From: Bricklen Anderson <bricklen@shaw.ca>
X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i586)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.databases.oracle.server
Subject: Re: Script to be notified by email if db is down
References: <ccc2a7eb.0112280229.7be85466@posting.google.com> <3c2c677f@news.takas.lt>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 37
Date: Wed, 02 Jan 2002 05:01:52 GMT
NNTP-Posting-Host: 24.64.223.206
X-Complaints-To: abuse@shaw.ca
X-Trace: news1.calgary.shaw.ca 1009947712 24.64.223.206 (Tue, 01 Jan 2002 22:01:52 MST)
NNTP-Posting-Date: Tue, 01 Jan 2002 22:01:52 MST
Organization: Shaw Residential Internet
Xref: easynews comp.databases.oracle.server:129337
X-Received-Date: Wed, 02 Jan 2002 05:35:39 MST (news.easynews.com)

would utl_smtp work in this case at all?

Vytas wrote:
> 
> #!/bin/sh
> #
> ps -eu genesys | grep ora_pmon_"SID"  > /dev/null
> if [ $? -ne 0 ]; then
> echo "Attention DB is down !!!" > /tmp/ccon_alert.err$$
> mail chse30@hotmail.com < /tmp/ccon_alert.err$$
> rm /tmp/ccon_alert.err$$
> else
> echo "  " > /dev/null
> fi
> 
> Script was writen unde HP so mayby you will nead to corect some details.
> If something goes wrong write to me.
> 
> "Christian Svensson" <chse30@hotmail.com> wrote in message
> news:ccc2a7eb.0112280229.7be85466@posting.google.com...
> > Greetings all,
> >
> > We dont run Enterprise Manager (Intelligent Agents) at our site, so we
> > want to have a script that runs periodically to check if the database
> > is up and if not, then it should e-mail me.
> >
> > I guess this is not so hard if you know unix (Solaris) scripting, but
> > I dont (yet).
> >
> > Does anyone have a script that can accomplish this ?
> >
> > I would be very thankful if so.
> >
> > Regards
> >
> >
> > /Christian
