ORASOLU TOOLBOX · HIGH AVAILABILITY

Data Guard Configuration

Practical Oracle Data Guard SQL for reviewing database members, redo destinations, standby redo logs, redo threads and Data Guard initialization parameters.

ORASOLU TOOLBOX · HIGH AVAILABILITY

Understand how Data Guard is configured

Review the databases participating in the configuration, redo transport destinations, standby redo logs, online redo threads and the initialization parameters that define Data Guard behavior.

01 · DATABASE CONFIGURATION

Review Data Guard database configuration

Review the database identity, role, protection mode and switchover state that define the current Data Guard member.

SELECT
    name,
    db_unique_name,
    database_role,
    open_mode,
    protection_mode,
    protection_level,
    switchover_status
FROM v$database;
02 · DATABASE MEMBERS

Review Data Guard members

List the unique database names known to the Data Guard configuration through DB_UNIQUE_NAME and LOG_ARCHIVE_CONFIG.

SELECT
    db_unique_name,
    parent_dbun,
    dest_role
FROM v$dataguard_config
ORDER BY db_unique_name;
03 · REDO DESTINATION CONFIGURATION

Review redo transport configuration

Inspect configured archive destinations, targets, transport mode, binding and destination status.

SELECT
    dest_id,
    status,
    target,
    db_unique_name,
    binding,
    transmit_mode,
    affirm,
    net_timeout,
    destination
FROM v$archive_dest
WHERE target = 'STANDBY'
ORDER BY dest_id;
04 · STANDBY REDO LOGS

Review standby redo log configuration

Inspect standby redo log groups, threads, sizes and current status on the database where the query is executed.

SELECT
    group#,
    thread#,
    sequence#,
    bytes,
    blocksize,
    used,
    archived,
    status
FROM v$standby_log
ORDER BY
    thread#,
    group#;
05 · ONLINE REDO THREADS

Review online redo configuration

Review online redo groups by thread to understand redo thread configuration before comparing standby redo capacity.

SELECT
    thread#,
    group#,
    sequence#,
    bytes,
    archived,
    status
FROM v$log
ORDER BY
    thread#,
    group#;
06 · DATA GUARD PARAMETERS

Review Data Guard initialization parameters

Inspect DB_UNIQUE_NAME, LOG_ARCHIVE_CONFIG and configured LOG_ARCHIVE_DEST parameters used by Data Guard.

SELECT
    name,
    value
FROM v$parameter
WHERE name = 'db_unique_name'
   OR name = 'log_archive_config'
   OR (
       name LIKE 'log_archive_dest_%'
       AND name NOT LIKE 'log_archive_dest_state_%'
   )
ORDER BY name;

ORASOLU TOOLBOX · HIGH AVAILABILITY

Configuration explains how redo moves between databases.

Start with the database identities and roles, then review the redo destinations and transport attributes. Compare online redo threads with standby redo logs when validating the redo configuration of a physical standby environment.

Oracle documents V$DATAGUARD_CONFIG as the view that lists the unique database names defined withDB_UNIQUE_NAME and LOG_ARCHIVE_CONFIG.