ORA-00314: log 102 of thread 1, expected sequence# 642317 doesn't match 642315

第一次见到这种错误,记录一下,根据网上搜的资料这个错误有可能会导致数据库挂掉,还好遇到的时候没挂。

alert日志如下:

关于报错的原因和解决方法mos搜到一篇相关文档符合遇到的情况 ORA-00314: LOG 404 OF THREAD 4, EXPECTED SEQUENCE# 33808 DOESN'T MATCH 33543 (Doc ID 1077564.1)

 

SYMPTOMS

Following errors are received when attempting to startup standby or while logs are being applied

ORA-00314: log 404 of thread 4, expected sequence# 33808 doesn't match 33543
ORA-00312: online log 404 thread 4: '+<path>/onlinelog/group_404.468.703522549'
ORA-00314: log 404 of thread 4, expected sequence# 33808 doesn't match 33543
ORA-00312: online log 404 thread 4: '+<path>/onlinelog/group_404.450.703522549'

报错原因

  • Standby redo has corrupt entry.
  • Instance crash while redo entry being transfer/received
  • The error message with ora-314 tells you the standby redo with corruption


例如,ORA-00314: log 404 of thread 4, expected sequence# 33808 doesn't match 33543
==> redo log group (# 404) is the one with corruption.

When problem (instance crash,network problem) happened, it was receiving sequence 33808 and was corrupted in the middle. so the header has info on sequence 33808 but current archive sequence# being transferred is 33543.

You may see the another standby redo is receiving the sequence# 33543 in v$standby_log with two of them are active status.

GROUP# DBID THREAD# SEQUENCE#
---------- ---------------------------------------- ---------- ----------
BYTES USED ARC STATUS FIRST_CHANGE# FIRST_TIME
---------- ---------- --- ---------- ------------- -------------------
LAST_CHANGE# LAST_TIME
------------ -------------------
401 1863397730 4 34381
104857600 93738496 YES ACTIVE 5.9903E+12 Jan 28 2010 05:22PM
5.9903E+12 Jan 28 2010 06:52PM

404 1863397730 4 33808
104857600 0 YES ACTIVE 5.9902E+12 Jan 24 2010 02:04AM
5.9903E+12 Jan 28 2010 06:52PM

 

解决方法

Clear standby redo with ora-314 error.

-- Stop recovery on standby side.
SQL> Alter database recover managed standby database cancel;

--clear standby redo group 404.
SQL>  alter database clear logfile group 404

-- You may have to use the 'unarchived'-Keyword to be able to clear the Standby RedoLog Group in most Cases, eg.
SQL> alter database clear unarchived logfile group 404;

 

结合mos文档和alert日志,再来整理一下问题发生的过程:

  • 17:33:04 RFS[426] selected log 102 for sequence 642315
  • 17:33:04 Media Recovery Waiting for sequence 642315(in transit),同时读取642315的online日志进行恢复。
  • 17:33:04 MRP applyed sequence 642314
  • 17:33:58 RFS[426] selected log 101 for sequence 642316
  • 17:33:58 Media Recovery Waiting for sequence 642316(in transit),同时读取642316的online日志进行恢复。
  • 17:34:00 MRP applyed sequence 642315
  • 17:34:49 RFS[426] selected log 102 for sequence 642317。
  • 17:34:49 传输的642317有损坏,导致报错ORA-314。此时standby logfile header中记录的sequence是642317,而数据库中最新applyed的sequence(current archive sequence# being transferred),即控制文件中记录的sequence是642315。所以也同时报错 ORA-00338:log 102 more recent than control file。
  • 17:34:50 Media Recovery Waiting for sequence 642317(in transit)-- 这里应该是续传642317的日志到standby log。并且运气好,续传还能接的上。所以后续就直接读取这个序列的standby log,MRP进行恢复了。
  • 17:34:51 MRP applyed sequence 642316
  • 17:35:49 MRP applyed sequence 642317,此后恢复了正常
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Hehuyi_In

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值