If you use Connor's script you can modify it to send you the entire chunk of
file it is currently checking in the body of the email.  Ideally you are
checking at a frequent interval so the time of the alert is usually about
the same time you get the error message.

One enhancement I suggest to every script is to configure the a SERVERERROR
trigger to throw certain errors out to the alert log.  ORA-1555 is one that
will show up at the session level but not at the database level.  Out of
TEMP space is another that is frequent at the session level but not the
database level.  This way you know who is causing some important errors.
Overtime I find more and more session errors that are really critical
database errors.  Try DDL on a table with an unusable index.  Pretty big
deal on most production databases but this is a session error and would not
typically show up in the alert log.  The risk of course is some huge loop
throwing 1000's of lines into the alert log.  I would suggest a governor of
some sort in your servererror trigger.

- Ethan

-----Original Message-----
Sent: Wednesday, August 27, 2003 2:49 PM
To: Multiple recipients of list ORACLE-L


When I grep something from the alert log,
it never tell me the date and time of the error.
Is there a setting for appending a timestamp on each error?

-----Original Message-----
Sent: Wednesday, August 27, 2003 1:35 PM
To: Multiple recipients of list ORACLE-L


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).

For technical support please email [EMAIL PROTECTED] or you can
call (972)721-8257. 
This email has been scanned for all viruses by the MessageLabs Email
Security System.
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Roger Xu
  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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Post, Ethan
  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).

Reply via email to