HTH
#!/bin/sh
# This Script search for Oracle error messages in last
100 lines in the alert log file ,
# keep log to a file.
# You should pass name of ORACLE_SID as a parameter.
#!/usr/bin/sh
#
# Comments: Script checks last 100 lines of
# the alert log for specific
# Oracle errors, e-mails depending on the error.
# Parameter: ORACLE_SID
# -------------------
#
#------------------------------------------------
DIR=/u01/app/oracle/admin
ORACLE_SID=$1
export ORACLE_SID
ORACLE_HOME=/u01/app/oracle/product/8.1.7
export ORACLE_HOME
ALERT_DEST=/u01/app/oracle/admin/${ORACLE_SID}/bdump
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
PATH=$PATH:$ORACLE_HOME/bin
export PATH
COLLECTOR=`tail -100
$ALERT_DEST/alert_${ORACLE_SID}.log |grep "ORA-"`
if [ "$COLLECTOR" <> "" ]
then
echo ""
echo "******** Errors found in: ====>
$ALERT_DEST/alert_${ORACLE_SID}.log"
echo ""
echo $COLLECTOR
echo ""
fi;
--- AK <[EMAIL PROTECTED]> wrote:
> I am sure you guys might have some nice perl/shell
> script to analyze alert log for errors or potential
> problem . Can you share it with me /list .
>
> Ohh thanks in advance guys .
>
> -ak
>
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Jose Luis Delgado
INET: [EMAIL PROTECTED]
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).