Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Searching the Alert log file
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