Google it ....

Showing posts with label ORA-16047. Show all posts
Showing posts with label ORA-16047. Show all posts

Thursday, February 2, 2017

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

The error shows a mismatch of DG_CONFIG parameter.
ORA-16047: DGID mismatch between destination setting and target database
Check the below parameters on both Primary and Standby databases.
On Primary:
SQL> show parameter log_archive_config

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_config                   string      DG_CONFIG=(testdb,teststby)

SQL> show parameter fal

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
fal_client                           string      TESTDB
fal_server                           string      teststby


SQL> show parameter log_archive_dest_2                  
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                   string      SERVICE=teststby NOAFFIRM ASYN
                                                 C VALID_FOR=(ONLINE_LOGFILES,P
                                                 RIMARY_ROLE) DB_UNIQUE_NAME=te
                                                 ststby
             
SQL> show parameter log_archive_dest_state_2            
log_archive_dest_state_2             string      ENABLE

On Standby:
SQL> show parameter log_archive_config

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_config                   string      DG_CONFIG=(testdb,teststby)

SQL> show parameter fal

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
fal_client                           string      teststby
fal_server                           string      testdb

SQL> show parameter log_archive_dest_2
                 
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                   string      SERVICE=testdb ASYNC VALID_FOR
                                                 =(ONLINE_LOGFILES,PRIMARY_ROLE
                                                 ) DB_UNIQUE_NAME=testdb
             
SQL> show parameter log_archive_dest_state_2
           
log_archive_dest_state_2             string      DEFER

If any of the above parameters are not set correctly the below error will appear
select DEST_NAME,STATUS,ERROR from v$ARCHIVE_DEST where status!='INACTIVE';

DEST_NAME          STATUS     ERROR
------------------ --------   -------------------------------------------------------------
LOG_ARCHIVE_DEST_1 VALID     
LOG_ARCHIVE_DEST_2 DISABLED   ORA-16047: DGID mismatch between destination setting and target database

If the parameters are set correct
select DEST_NAME,STATUS,ERROR from v$ARCHIVE_DEST where status!='INACTIVE';

DEST_NAME          STATUS     ERROR
------------------ --------   -------------------------------------------------------------
LOG_ARCHIVE_DEST_1 VALID     
LOG_ARCHIVE_DEST_2 VALID