When I set up physical standby the day before yesterday, the previous steps were all correct (in fact, they were wrong). When I verified whether the archived logs were synchronized to the standby database, I found:
ORA-16047: DGID mismatch between destination setting and standby
Our solution is to set log_archive_config in both the master and backup
1. Slave Database
idle> show parameter log_archive_config;NAME TYPE VALUE------------------------------------ ----------- ------------------------------log_archive_config string DG_CONFIG=(ORCL_PRY,ORCL_PHY)
2. master database
sys@ORCL> show parameter log_archive_config;NAME TYPE VALUE------------------------------------ ----------- ------------------------------log_archive_config string DG_CONFIG=(ORCL_PRY,ORCL_PHY)
What is log_archive_config? Here, I will only give my own understanding. If you want to go deep, you can refer to the official documentation.
It is mainly for redo log transfer and receiving, in maximum availability and maximum protection mode setting will have an impact, not set in switchover switch will report ORA-16047.
Use dg_config to list all db_unique_name in the DG Environment:
Master database:
*. Log_archive_config = 'dg _ config = (master, stdby )'
Slave database:
*. Log_archive_config = 'dg _ config = (stdby, master )'
Note that I have one principle:You are in front of others. However, this parameter is order-independent :-)
Finally, it is very important to learn a useful technique during the fault diagnosis process: Using tcpdump to observe network streams
For example, run the following command on the slave database:
Tcpdump-I eth1 port 1521
This is useful and can be recorded.
In addition, tail-f is used to observe the alarm log fl.
Good Luck!