免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3867 | 回复: 1
打印 上一主题 下一主题

[Hive] oracle11R2双机热备v$archived_log中sequence重复的问题,请高手解惑! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-06-25 19:44 |只看该作者 |倒序浏览
本帖最后由 nicolas37 于 2012-06-25 19:48 编辑

oracle版本是11R2,双机热备是DG模式,之前使用时一直都是正常的,昨天再做主备库切换后,查询v$archived_log视图,发现原主库现备库shpri中sequence71重复了,在本地的archive log应用了,传到原备库的没有应用。现主库原备库shdg从sequence72开始重复出现记录,本地的archive log没有被应用,传到shpri上的log被apply了。

昨天是在log sequence为71的时候做的主备切换,从shpri切换到shdg,数据是完整的,不影响使用,但是不知道为什么会出现这种记录。

截取了一部分日志信息:
切换时原主库现备库shdg的日志:
Sun Jun 24 19:48:03 2012
Thread 1 cannot allocate new log, sequence 71
Checkpoint not complete

  Current log# 1 seq# 70 mem# 0: /home/app/oracle/oradata/shpri/redo01.log
Thread 1 closed at log sequence 71
Successful close of redo thread 1
ARCH: Noswitch archival of thread 1, sequence 71
ARCH: End-Of-Redo Branch archival of thread 1 sequence 71
Archived Log entry 231 added for thread 1 sequence 71 ID 0x47d384ac dest 1:
ARCH: Archiving is disabled due to current logfile archival
Primary will check for some target standby to have received all redo
Final check for a synchronized target standby. Check will be made once.
LOG_ARCHIVE_DEST_2 is a potential Physical Standby  switchover target

Active, synchronized target has been identified
Target has also applied all redo

Backup controlfile written to trace file /home/app/oracle/diag/rdbms/shpri/shpri/trace/shpri_ora_1334.trc
Clearing standby activation ID 1205044396 (0x47d384ac)
The primary database controlfile was created using the
'MAXLOGFILES 16' clause.
There is space for up to 13 standby redo logfiles
Use the following SQL commands on the standby database to create
standby redo logfiles that match the primary database:
ALTER DATABASE ADD STANDBY LOGFILE 'srl1.f' SIZE 52428800;
ALTER DATABASE ADD STANDBY LOGFILE 'srl2.f' SIZE 52428800;
ALTER DATABASE ADD STANDBY LOGFILE 'srl3.f' SIZE 52428800;
ALTER DATABASE ADD STANDBY LOGFILE 'srl4.f' SIZE 52428800;
Archivelog for thread 1 sequence 71 required for standby recovery
Switchover: Primary controlfile converted to standby controlfile succesfully.
Sun Jun 24 19:50:13 2012
MRP0 started with pid=17, OS id=6632
MRP0: Background Managed Standby Recovery process started (shpri)
Serial Media Recovery started
Managed Standby Recovery not using Real Time Apply
Online logfile pre-clearing operation disabled by switchover
Media Recovery Log /home/app/oracle/archive/1_71_786222847.arc
Identified End-Of-Redo for thread 1 sequence 71
Resetting standby activation ID 0 (0x0)
Media Recovery End-Of-Redo indicator encountered
Media Recovery Applied until change 1253528
MRP0: Media Recovery Complete: End-Of-REDO (shpri)
MRP0: Background Media Recovery process shutdown (shpri)
Sun Jun 24 19:50:27 2012
Waiting for MRP0 pid 6632 to terminate
Switchover: Complete - Database shutdown required (shpri)
Sun Jun 24 19:50:27 2012
idle dispatcher 'D000' terminated, pid = (17, 1)
Completed: alter database commit to switchover to physical standby with session shutdown
日志中显示检测原备库shdg已经apply全部日志了

当时原备库现主库shdg的日志:
Sun Jun 24 19:48:13 2012
Media Recovery Log /home/app/oracle/archive/1_70_786222847.arc
Media Recovery Waiting for thread 1 sequence 71
Sun Jun 24 19:49:09 2012
RFS[6]: Assigned to RFS process 14196
RFS[6]: Identified database type as 'physical standby': Client is ARCH pid 28183
Sun Jun 24 19:50:12 2012
RFS[7]: Assigned to RFS process 14227
RFS[7]: Identified database type as 'physical standby': Client is Foreground pid 1334
RFS[7]: Opened log for thread 1 sequence 71 dbid 1201613339 branch 786222847
Archived Log entry 45 added for thread 1 sequence 71 rlc 786222847 ID 0x47d384ac dest 2:
Sun Jun 24 19:50:13 2012
RFS[8]: Assigned to RFS process 14229
RFS[8]: Identified database type as 'physical standby': Client is Foreground pid 1334
Sun Jun 24 19:50:24 2012
Media Recovery Log /home/app/oracle/archive/1_71_786222847.arc
Identified End-Of-Redo for thread 1 sequence 71
Resetting standby activation ID 1205044396 (0x47d384ac)
Media Recovery End-Of-Redo indicator encountered
Media Recovery Applied until change 1253528
Sun Jun 24 19:50:24 2012
MRP0: Media Recovery Complete: End-Of-REDO (shdg)
MRP0: Background Media Recovery process shutdown (shdg)
Sun Jun 24 20:07:37 2012
alter database commit to switchover to primary
ALTER DATABASE SWITCHOVER TO PRIMARY (shdg)
Maximum wait for role transition is 15 minutes.
Backup controlfile written to trace file /home/app/oracle/diag/rdbms/shdg/shdg/trace/shdg_ora_13730.trc
SwitchOver after complete recovery through change 1253528
Online log /home/app/oracle/oradata/shdg/redo01.log: Thread 1 Group 1 was previously cleared
Online log /home/app/oracle/oradata/shdg/redo02.log: Thread 1 Group 2 was previously cleared
Online log /home/app/oracle/oradata/shdg/redo03.log: Thread 1 Group 3 was previously cleared
Standby became primary SCN: 1253526
Switchover: Complete - Database mounted as primary
原备库现主库shdg在切换时也用sequence为71的log做完recover了,并且两个库的scn是同步的。

切换都正常,数据也完整,但是不明白为什么v$archived_log里会有sequence重复的记录,麻烦高手解答一下,谢谢!
原备库现主库shdg的v$archived_log


原主库现备库shpri的v$archived_log

论坛徽章:
0
2 [报告]
发表于 2012-07-13 09:49 |只看该作者
回复 1# nicolas37


    如何创建DG的啊 ? 语句是什么?在哪里执行 ?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP