ORA-16047:DGID mismatch between destination setting and standby

ORA-16047:DGID mismatch between destination setting and standby

PING[ARC2]: Heartbeat failed to connect to standby '(DESCRIPTION=(ADDRESS_LIST=(
ADDRESS=(PROTOCOL=tcp)(HOST=xxxxx)(PORT=xxxx)))(CONNECT_DATA=(SERVICE_NAME=
xxxxx_XPT)(INSTANCE_NAME=xxxxxx)(SERVER=dedicated)))'. Error is 16047

You may've come across this error message in v$dataguard_status a few times if you've implemented dataguard and if the network connectivity is ok, it's a bit difficult to troubleshoot.

One solution I've implemented to success a few times so far is to verify the status of standby 'dest_id' in v$archive_dest view on primary database.

On primary, execute the query select dest_id,status from v$archive_dest;

If the status is 'DISABLED' or 'ERROR', then run 'alter system set log_archive_dest_state_2='ENABLE' scope=both' on primary.

This will fix the above mentioned error and the log shipping/apply will start happening resolving any gaps automatically.

if you do a "show parameter log_archive_dest_state_2" on primary it shows enable even though the actual status is 'DISABLED' from the dynamic view v$archive_dest.