Query to Check for Errors in the Alert Log
SELECTTO_CHAR(originating_timestamp, 'YYYY-MM-DD HH24:MI:SS') AS error_time,message_textFROMv$diag_alert_extWHEREmessage_text LIKE '%ORA-%'AND originating_timestamp >= SYSDATE - 1/24 -- last 1 hourORDER BYoriginating_timestamp DESC;
SELECToriginating_timestamp,message_textFROMv$diag_alert_extWHEREREGEXP_LIKE(message_text, 'ORA-\d{5}') -- Matches all ORA-XXXXX error messagesANDoriginating_timestamp >= SYSDATE - (1/24) -- Retrieves messages from the last 1 hourANDmessage_text NOT LIKE 'ORA-0%' -- Excludes only ORA-0 errors (e.g., ORA-00000)ORDER BYoriginating_timestamp DESC;
Post a Comment
Post a Comment