Tuesday, August 16, 2016

ORA-16047: DGID mismatch between destination setting and target database

ORA-16047: DGID mismatch between destination setting and target database

Step-1: Error check in in v$archive_dest.

select dest_id,status,error from v$archive_dest;
DEST_ID  STATUS       ERROR
------  ------------- -----------------------------------------------------------------
1       VALID
2       VALID
3       DISABLED      ORA-16047: DGID mismatch between destination setting and target database

Step-2: Check db_name, db_unique_name and log_archive_config parameter on Primary and standby database.

On PRIMARY
SQL> show parameter db_name;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_name                              string      remitdb
SQL>
SQL> show parameter db_unique_name;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_unique_name                       string      remitdb
SQL>
SQL> show parameter log_archive_config;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_config                   string      DG_CONFIG=(remitdb,remitdbstd,
                                                 remitdbdr)
SQL>

On STANDBY
SQL> show parameter db_name;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_name                              string      remitdb
SQL>
SQL> show parameter db_unique_name;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_unique_name                       string      remitdb
SQL>
SQL> show parameter log_archive_config;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_config                   string      DG_CONFIG=(remitdb,remitdbstd,
                                                 remitdbdr)
SQL>


Problem Identification and Solution: In STANDBY DATABASE db_unique_name is incorrect. In STANDBY DATABASE db_unique_name will remitdbdr instead of remitdb.



2 comments:

  1. Primary:
    select DEST_ID,DEST_NAME,STATUS,BINDING,ERROR from v$ARCHIVE_DEST where status<>'INACTIVE'
    /SQL> SQL> SQL> SQL> 2

    DEST_ID DEST_NAME STATUS BINDING ERROR
    ---------- -------------------------------------------------- --------- ---------- -----------------------------------------------------------------
    1 LOG_ARCHIVE_DEST_1 VALID OPTIONAL
    2 LOG_ARCHIVE_DEST_2 DISABLED OPTIONAL ORA-16047: DGID mismatch between destination setting and target
    database

    SQL> show parameter db_name;

    NAME TYPE VALUE
    ------------------------------------ ----------- ------------------------------
    db_name string DEV
    SQL> show parameter db_unique_name;

    NAME TYPE VALUE
    ------------------------------------ ----------- ------------------------------
    db_unique_name string DEV
    SQL>
    SQL> show parameter log_archive_config;

    NAME TYPE VALUE
    ------------------------------------ ----------- ------------------------------
    log_archive_config string DG_CONFIG=(DEV,DEV2)
    **********************************************************************************
    Standby:
    select DEST_ID,DEST_NAME,STATUS,BINDING,ERROR from v$ARCHIVE_DEST where status<>'INACTIVE'
    /SQL> SQL> SQL> SQL> 2

    DEST_ID DEST_NAME STATUS BINDING ERROR
    ---------- -------------------------------------------------- --------- ---------- -----------------------------------------------------------------
    1 LOG_ARCHIVE_DEST_1 VALID OPTIONAL
    2 LOG_ARCHIVE_DEST_2 VALID OPTIONAL
    32 STANDBY_ARCHIVE_DEST VALID MANDATORY

    SQL>
    SQL>
    SQL>
    SQL> show parameter db_name;

    NAME TYPE VALUE
    ------------------------------------ ----------- ------------------------------
    db_name string DEV
    SQL> show parameter db_unique_name;

    NAME TYPE VALUE
    ------------------------------------ ----------- ------------------------------
    db_unique_name string DEV2
    SQL>
    SQL>
    SQL> show parameter log_archive_config;

    NAME TYPE VALUE
    ------------------------------------ ----------- ------------------------------
    log_archive_config string DG_CONFIG=(DEV,DEV2)

    ReplyDelete
  2. Mon Aug 12 21:21:21 2019
    PING[ARC2]: Heartbeat failed to connect to standby 'DEV2'. Error is 16047.
    Mon Aug 12 21:22:21 2019
    PING[ARC2]: Heartbeat failed to connect to standby 'DEV2'. Error is 16047.
    Mon Aug 12 21:22:24 2019
    Thread 1 advanced to log sequence 24 (LGWR switch)
    Current log# 3 seq# 24 mem# 0: /u01/app/oracle/oradata/redo03/Dev/redo03a.log
    Current log# 3 seq# 24 mem# 1: /u01/app/oracle/oradata/redo04/Dev/redo03b.log
    Mon Aug 12 21:22:24 2019
    Archived Log entry 17 added for thread 1 sequence 23 ID 0xf3feaf6e dest 1:
    Mon Aug 12 21:22:24 2019
    FAL[server, ARC4]: Error 16047 creating remote archivelog file 'DEV2'
    FAL[server, ARC4]: FAL archive failed, see trace file.
    ARCH: FAL archive failed. Archiver continuing
    ORACLE Instance DEV - Archival Error. Archiver continuing.
    Thread 1 advanced to log sequence 25 (LGWR switch)
    Current log# 1 seq# 25 mem# 0: /u01/app/oracle/oradata/redo03/Dev/redo01a.log
    Current log# 1 seq# 25 mem# 1: /u01/app/oracle/oradata/redo04/Dev/redo01b.log
    Mon Aug 12 21:22:26 2019
    ARC0: Archivelog destination LOG_ARCHIVE_DEST_2 disabled: Data Guard configuration identifier mismatch
    Archived Log entry 18 added for thread 1 sequence 24 ID 0xf3feaf6e dest 1:
    Mon Aug 12 21:30:30 2019
    Starting background process CJQ0
    Mon Aug 12 21:30:30 2019
    CJQ0 started with pid=31, OS id=3483
    **********************************************
    Logs are not shipping to Standby.
    I am not sure where is the loop hole, please help..

    Thanks in advance.

    ReplyDelete