From ravindra@sentica.com Tue, 10 Jul 2001 15:57:41 -0700 From: "Ravindra Basavaraja" Date: Tue, 10 Jul 2001 15:57:41 -0700 Subject: RE: Email/Paging/Mobile Phone alerts Message-ID: MIME-Version: 1.0 Content-Type: text/plain Does anyone have a similiar script for doing the same on Windows NT.   Thanks Ravindra -----Original Message-----From: root@fatcity.com [mailto:root@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: dba_alert@wherever.net"            echo "Subject: `uname -n` $error"            echo "`uname -n` alert_log"            echo $prevline | sed 's=:=-='            echo $line | sed 's=:=-='        ) | mail dba_alert@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@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: http://www.orafaq.com-- Author: Ravindra Basavaraja  INET: ravindra@sentica.com