denrepo

OracleData Guard

Data Guard errors and warnings, last 24 hours

Messages Data Guard wrote to V$DATAGUARD_STATUS, filtered to warnings and errors. Run on both sides.

Not yet verified. How scripts are tested

ora-dg-messages.sql
1CLEAR COLUMNS2SET LINESIZE 180 PAGESIZE 100 TRIMOUT ON TAB OFF3COLUMN at_time    HEADING "TIME"   FORMAT A194COLUMN facility   FORMAT A245COLUMN severity   FORMAT A86COLUMN error_code HEADING "ERROR"  FORMAT 999997COLUMN message    FORMAT A90 WORD_WRAPPED8 9SELECT TO_CHAR(timestamp, 'YYYY-MM-DD HH24:MI:SS') AS at_time,10       facility, severity, error_code, message11FROM v$dataguard_status12WHERE timestamp > SYSDATE - 113  AND severity IN ('Warning', 'Error', 'Fatal')14ORDER BY timestamp DESC;

Save it as ora-dg-messages.sql and run it with SQL> @ora-dg-messages.

Open in denrepo

Part of these runbooks

More Oracle scripts: Data Guard