Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Searching the Alert log file

Re: Searching the Alert log file

From: Peter Wales <paw_at_bulmer.com>
Date: 1997/04/11
Message-ID: <334E39C7.50152C4D@bulmer.com>#1/1

John Hough wrote:

> Does anyone have a script that searches the alert log for
> pre-defined
> errors and e-mails a distribution list is errors occur. A script
> written in PERL would be perfect since we have to run this on unix,
> NT and VMS.
>
> Thanks,
>
> John Hough

 John,

I don't have one but it would go something like this (in shell)

cd $ORACLE_HOME/rdbms/log
grep "ORA-" alert_dbname.log > myalert.log

   cat /tmp/space.tmp|mail -s john_at_somehost.com

this would mail blank files as well, so you might like to test the return code from grep, or the file size to see that it's not empty.

Hope this helps,

Perer.

--
+---------------------------------------------------------------+
| Peter Wales                                                   |
| IT Operational Services                                       |
| HP Bulmer Ltd            "The Worlds Largest Cider Maker"     |
| MailTo:PAW@bulmer.com          http://www.bulmer.com          |
+---------------------------------------------------------------+
Received on Fri Apr 11 1997 - 00:00:00 CDT

Original text of this message

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