Search This Blog

Friday, December 26, 2014

Query to monitor Alert Log report of last n days.

SET linesize 500 pagesize 500
col RECORD_ID FOR 9999999 head ID
col MESSAGE_TEXT FOR a120 head Message
col ORIGINATING_TIMESTAMP for a20 head Date


SELECT to_char(originating_timestamp,'DD-MM-RR HH24:MI:SS') "Time", message_text
FROM X$DBGALERTEXT
WHERE originating_timestamp > systimestamp - &Days
AND
regexp_like(message_text, '(TNS-|ORA-|error)');



Enjoy :)
Gaurav Sahi

No comments:

Post a Comment