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

Home -> Community -> Usenet -> c.d.o.server -> Re: Script to be notified by email if db is down

Re: Script to be notified by email if db is down

From: Vytas <xpastas_at_xxx.lt>
Date: Fri, 28 Dec 2001 14:37:18 +0200
Message-ID: <3c2c677f@news.takas.lt>


#!/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_at_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_at_hotmail.com> wrote in message news:ccc2a7eb.0112280229.7be85466_at_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
Received on Fri Dec 28 2001 - 06:37:18 CST

Original text of this message

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