Does anyone have a similiar script for doing
the same on Windows NT.
Thanks
Ravindra
<FONT
face=Tahoma>-----Original Message-----From: root_at_fatcity.com
[mailto:root_at_fatcity.com]On Behalf Of John CarlsonSent:
Thursday, February 22, 2001 5:30 PMTo: Multiple recipients of list
ORACLE-LSubject: Re: Email/Paging/Mobile Phone
alerts
I will make the assumption this is on unix and you can write a shell
script. Here is a skeleton of the code. You can put your own
checks it.
EXAMPLE
>>>>>>>>>>>>>>>>>>>>>>>>>>>
#!/bin/ksh
tail -1f alert_xxxxx.log | while read linedo
#### any other code you want here.
echo $line | grep ORA- if [ $?
-eq 0 ] ; then
(
error=`echo $line | sed
's=:.*=='`
echo "To: <A
href="mailto:dba_alert_at_wherever.net">dba_alert_at_wherever.net"
echo "Subject: `uname -n`
$error"
echo "`uname -n`
alert_log"
echo $prevline | sed
's=:=-='
echo $line | sed 's=:=-=' ) |
mail <A
href="mailto:dba_alert_at_wherever.net">dba_alert_at_wherever.net
fi
prevline=$line
done
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
This will run perpetually and check every line the alert log
writes. You can test for any messages you want and send messages to
whatever. Note the sed command changes ':' to '-' because mail has a
problem with colons in the text body sometimes. Also, some mail servers
cannot handle it properly without the extra "To:".
Obviously, this is just a snippet of code. You need to customize it
for your own needs. You may need to write other scripts to query the
database to get number of connections and active connections if you need
that.
HTH,
John Carlson
http://www.cj.com
>>> ravindra_at_sentica.com 02/22/01 03:15PM
>>>I am looking at a solution of sending a
email/paging/Mobilephone alertsin case of a problem on the database that
is reported in the alert.logfile. like tablespace full,no. of processes
exceeded,instance going downetc.I want a solution other than
OEM.What are the other ways of sending suchalert to notify the person who
takes care of the database.Thanks-Ravindra-- Please
see the official ORACLE-L FAQ: <A
href="
http://www.orafaq.com">
http://www.orafaq.com-- Author:
Ravindra Basavaraja INET:
ravindra_at_sentica.com
Received on Tue Jul 10 2001 - 17:57:41 CDT