Oracle dg下掉一个从库
1、在数据库中查找要下线的从库
SQL> show parameter log_archive_dest
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
log_archive_dest string
log_archive_dest_1 string LOCATION=/u01/app/archive_log valid_for=(all_logfiles,all_roles) db_unique_name=orcl1
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
log_archive_dest_2 string SERVICE=standby lgwr async valid_for=(online_logfiles,primary_role) db_unique_name=orcl2
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
log_archive_dest_3 string SERVICE=standby_alhz lgwr async valid_for=(online_logfiles,primary_role) db_unique_name=orcl3
log_archive_dest_state_1 string enable
log_archive_dest_state_2 string enable
log_archive_dest_state_3 string ENABLE
2、取消归档日志传输
SQL> alter system set log_archive_dest_state_2 ='defer';
SQL> show parameter log_archive_dest
log_archive_dest_state_1 string enable
log_archive_dest_state_2 string defer
log_archive_dest_state_3 string ENABLE
3、重新配置归档日志的路径
SQL> alter system set log_archive_config ='DG_CONFIG=(orcl1,orcl3)';
4、
SQL> alter system reset LOG_ARCHIVE_DEST_STATE_2;
SQL> alter system reset LOG_ARCHIVE_DEST_2;
5、修改监听tnsnames.ora文件,并重启