OracleData Guard
Redo destinations and transport errors
Every active archive destination with its status, gap state and last error. Any text in the ERROR column means redo isn't reaching that standby.
Not yet verified. How scripts are tested
1CLEAR COLUMNS2SET LINESIZE 200 PAGESIZE 100 TRIMOUT ON TAB OFF3COLUMN dest_id HEADING "ID" FORMAT 994COLUMN dest_name HEADING "DEST" FORMAT A205COLUMN status FORMAT A96COLUMN type FORMAT A87COLUMN database_mode HEADING "DB MODE" FORMAT A158COLUMN recovery_mode HEADING "RECOVERY" FORMAT A25 TRUNCATE9COLUMN gap_status HEADING "GAP" FORMAT A1810COLUMN error FORMAT A50 WORD_WRAPPED11 12SELECT dest_id, dest_name, status, type, database_mode,13 recovery_mode, gap_status, error14FROM v$archive_dest_status15WHERE status <> 'INACTIVE'16ORDER BY dest_id;Save it as ora-dg-dest.sql and run it with SQL> @ora-dg-dest.
Helps with
- ORA-00257: Archiver error. Connect AS SYSDBA only until resolved.
- ORA-16014: log %s sequence# %s not archived, no available destinations
Part of these runbooks
More Oracle scripts: Data Guard
- Transport and apply lagHow far behind the standby is in receiving and applying redo. A growing apply lag with no transport lag points at the apply process, not the network.
- Redo apply and transport processesWhich Data Guard processes are running and what they're doing. No MRP0 row means redo is arriving but not being applied. Before 12.2, query…
- Archive gaps and last applied sequenceMissing log sequences the standby is waiting for, then the last applied sequence per thread. Compare with the current sequence on the primary.
- Data Guard errors and warnings, last 24 hoursMessages Data Guard wrote to V$DATAGUARD_STATUS, filtered to warnings and errors. Run on both sides.
- Standby redo log configurationStandby redo logs by thread. You want one more group per thread than you have online log groups, all the same size as the online logs.
- Broker health checks (DGMGRL)The broker's own view of the configuration. VALIDATE DATABASE is the best single readiness check before a switchover.