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: shell script to parse alert log looking for certain ora- errors

Re: shell script to parse alert log looking for certain ora- errors

From: <jtesta_at_my-dejanews.com>
Date: Wed, 09 Dec 1998 12:54:47 GMT
Message-ID: <74lrun$umk$1@nnrp1.dejanews.com>


In article <74jqio$dd2$1_at_nntpd2.cxo.dec.com>,   "Pat Soehl" <pat.soehl_at_cxo.dec.com> wrote:
> I'm pretty new to writing shell scripts, being mostly familiar with VMS.
> I'm now a DBA on a Sun Solaris system. I need a script that
> parses through the alert logs looking for certain ora errors: such as
> 600... etc.
>
> Is there some samples somewhere that I could use?
>
> Thanks in advance,
>
>

Here is what i use:
The $ALERT_FILE is a variable you can either hard code or get the bdump directory from the v$parameter

  COUNT=`grep -c "ORA-00600" $ALERT_FILE/alert*`   if [ $COUNT -gt 0 ]
  then
# @(#) 0003 - check_database.sh - Look at ALERT LOG FOR instance...00600

   /usr/local/bin/call_pager.sh $PAGER_NUMBER (MACHINE_NUMBER}${INSTANCE_NUMBER}0003
  fi

We then call the call_pager.sh script to call a numeric pager with the error code.

hth, joe
http://www.oracle.dba.com
mailto:oracle_news_at_oracle-dba.com

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Dec 09 1998 - 06:54:47 CST

Original text of this message

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