I was building a new standby and after I enabled log_archive_dest_state_2 on the primary, the below error message was reported in the primary’s alert_log:
ALTER SYSTEM SET log_archive_dest_state_2='ENABLE' SCOPE=BOTH SID='*'; Tue Mar 20 00:20:08 2018 Errors in file /oracle/home/trace/PRODDB_tt01_438.trc: ORA-16047: DGID mismatch between destination setting and target database Error 16047 for archive log file 6 to 'STDBYDB' Tue Mar 20 00:20:08 2018 Errors in file /oracle/home/trace/PRODDB_tt01_438.trc: ORA-16047: DGID mismatch between destination setting and target database Tue Mar 20 00:20:08 2018 Errors in file /oracle/home/trace/PRODDB_tt01_438.trc: ORA-16047: DGID mismatch between destination setting and target database Tue Mar 20 00:20:08 2018 Errors in file /oracle/home/trace/PRODDB_arc1_8368.trc: ORA-16047: DGID mismatch between destination setting and target database Tue Mar 20 00:20:08 2018 PING[ARC1]: Heartbeat failed to connect to standby 'STDBYDB'. Error is 16047.
After a few minutes of consternation, I realized that I had an incorrect parameter on the standby:
SQL> show parameter db_unique_name; NAME TYPE VALUE db_unique_name string PRODDB
Basically, I had inadvertently set the db_unique_name to PRODDB on both the primary and standby database. I changed the standby as follows:
alter system set db_unique_name=STDBYDB scope=spfile sid='*';
And bounced the standby. This resolved the issue.