dg switchover后的问题

痞子三分冷 提交于 2020-01-24 09:44:22

场景:备库只能接收归档日志,不能实时应用redo log,如果主端日志不切换,备端一直会有adg延迟

后台日志:

RFS[1]: Assigned to RFS process 5351
RFS[1]: No standby redo logfiles available for thread 1
RFS[2]: Assigned to RFS process 5353
RFS[2]: No standby redo logfiles available for thread 1
RFS[1]: Opened log for thread 1 sequence 102 dbid 1485808053 branch 960908345
RFS[2]: Opened log for thread 1 sequence 103 dbid 1485808053 branch 960908345
Archived Log entry 175 added for thread 1 sequence 102 rlc 960908345 ID 0x579951e6 dest 3:
Serial Media Recovery started
Managed Standby Recovery starting Real Time Apply
Waiting for all non-current ORLs to be archived…
All non-current ORLs have been archived.
Media Recovery Log /u01/app/oracle/fast_recovery_area/ORCL/archivelog/2017_12_27/o1_mf_1_102_f46gw1t4_.arc
Media Recovery Waiting for thread 1 sequence 103 (in transit)
Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE THROUGH ALL SWITCHOVER DISCONNECT USING CURRENT LOGFILE
备库standby redo状态全为UNASSIIGNED:
GROUP# DBID THREAD# SEQUENCE# BYTES BLOCKSIZE USED ARCHIVED STATUS
4 UNASSIGNED 0 0 52428800 512 0 YES UNASSIGNED
5 UNASSIGNED 0 0 52428800 512 0 YES UNASSIGNED
6 UNASSIGNED 0 0 52428800 512 0 YES UNASSIGNED
7 UNASSIGNED 0 0 52428800 512 0 YES UNASSIGNED

  1. 停止备库日志应用
    SQL> alter database recover managed standby database cancel;

Database altered.
2. 删除已有的standby log日志组
alter database drop standby logfile group 4;
alter database drop standby logfile group 5;
alter database drop standby logfile group 6;
alter database drop standby logfile group 7;
3. 重建standby log
alter database add standby logfile group 4 ‘/u01/app/oracle/oradata/orcl/std_redo04.log’ size 50M;
alter database add standby logfile group 5 ‘/u01/app/oracle/oradata/orcl/std_redo05.log’ size 50M;
alter database add standby logfile group 6 ‘/u01/app/oracle/oradata/orcl/std_redo06.log’ size 50M;
alter database add standby logfile group 7 ‘/u01/app/oracle/oradata/orcl/std_redo07.log’ size 50M;

  1. 开启实时日志应用
    SQL> alter database recover managed standby database using current logfile disconnect from session;

Database altered.

查看下standby log的状态,应该有一个为active状态的日志组,如果还是不能实时应用可以重启备库
————————————————
版权声明:本文为CSDN博主「bitko」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/gumengkai/article/details/78911975

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!