ORA-16047: DGID mismatch between destination setting and target database
Primary database omrdb
Dataguard omrdg
1- Check db_name and db_unique_name parameter on Primary and standby database
On Primary
SQL> show parameter db_name
NAME TYPE VALUE
----------------------- ----------- ------------------------------
db_name string omrdb
SQL> show parameter db_unique
NAME TYPE VALUE
----------------------- ----------- ------------------------------
db_unique_name string omrdb
On Dataguard
SQL> show parameter db_name
NAME TYPE VALUE
--------------------- ----------- ------------------------------
db_name string OMRDB
SQL> show parameter db_unique
NAME TYPE VALUE
--------------------- ----------- ------------------------------
db_unique_name string omrdg
2- Check log_archive_config parameter
SQL>show parameter log_archive_config
NAME TYPE VALUE
------------------------- ----------- ------------------------------
log_archive_config string dg_config=(omrdb,omrdg)
3- Check log_archive_dest_2 parameter on primary database
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
------------------------ ----------- ------------------------------
log_archive_dest_2 string service=omrdg lgwr async valid_for=(online_logfiles,primary_role) db_unique_name=omrdb
4- Set the db_unique_name value correct to omrdg dataguard database
SQl>alter system set log_archive_dest_2='service=omrdg lgwr async valid_for=
(online_logfiles,primary_role) db_unique_name=omrdg' scope=spfile
5- Bounce the primary database and check alert log of standby database, it should show recovery like:
Sun Jun 17 07:47:54 2012
Media Recovery Log /u01/app/oracle/flash_recovery_area/OMRDG/archivelog/2012_06_17/o1_mf_1_67_7xtrccnj_.arc
Media Recovery Log /u01/app/oracle/flash_recovery_area/OMRDG/archivelog/2012_06_17/o1_mf_1_68_7xtrc0t8_.arc
Media Recovery Log /u01/app/oracle/flash_recovery_area/OMRDG/archivelog/2012_06_17/o1_mf_1_69_7xtrc0cr_.arc
Media Recovery Log /u01/app/oracle/flash_recovery_area/OMRDG/archivelog/2012_06_17/o1_mf_1_70_7xtrc0hc_.arc
Media Recovery Log /u01/app/oracle/flash_recovery_area/OMRDG/archivelog/2012_06_17/o1_mf_1_71_7xtrc0yn_.arc
6- Check the v$archived_log view on dataguard
1* select sequence#,applied from v$archived_log order by sequence#
SQL> /
SEQUENCE# APPLIED
---------- ---------
67 YES
68 YES
69 YES
70 YES
71 YES
72 YES
73 YES
74 YES
75 YES
76 YES
77 YES
78 YES
79 YES
80 YES
14 rows selected.