denrepo

OracleDiagnostics

Alert log errors in the last 24 hours

ORA- and TNS- errors plus checkpoint warnings from the alert log, read through SQL. It can be slow when the alert log is very large.

12c+

Not yet verified. How scripts are tested

ora-alert-errors.sql
1CLEAR COLUMNS2SET LINESIZE 200 PAGESIZE 200 TRIMOUT ON TAB OFF3COLUMN at_time HEADING "TIME" FORMAT A194COLUMN message FORMAT A150 WORD_WRAPPED5 6SELECT TO_CHAR(originating_timestamp, 'YYYY-MM-DD HH24:MI:SS') AS at_time,7       SUBSTR(message_text, 1, 300) AS message8FROM v$diag_alert_ext9WHERE originating_timestamp > SYSTIMESTAMP - INTERVAL '1' DAY10  AND (message_text LIKE '%ORA-%'11       OR message_text LIKE '%TNS-%'12       OR message_text LIKE '%Checkpoint not complete%')13ORDER BY originating_timestamp DESC;

Save it as ora-alert-errors.sql and run it with SQL> @ora-alert-errors.

Open in denrepoRelated tool: Oracle error lookup

Helps with

Part of these runbooks

More Oracle scripts: Diagnostics