Re: looking at alert log

  • From: "Yong Huang" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "yong321" for DMARC)
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 18 Nov 2016 22:34:43 +0000 (UTC)

Brian,

Instead of reading the entire alert.log, which could grow big, why not read the 
tail?

tail -f alert.log | grep pattern

I have a fairly sophiscated example (called ck_alert_log.sh) at 
http://yong321.freeshell.org/computer/logfile.html

The `tail -f' command uses near-zero CPU and I/O, regardless the size of 
alert.log, and can immediately notify you of an error (if the command is piped 
to mail), 

If you must do this with SQL, x$dbgalertext is the table you need to query as 
others have suggested. Or v$diag_alert_ext, which is the ADR version, and is 
slower. Alternatively, create an external table based on alert.log. But you 
can't read from the tail of the file.

Yong

Zelli, Brian wrote:

I am running this script to check the alert log for errors and it runs every 
few minutes.
How can I just look at the last few minutes as opposed to the entire day?
--
//www.freelists.org/webpage/oracle-l


Other related posts: