oracle10g DataGuard switchover report ORA-16139

在Oracle 10.2.0.4 版本的 DataGuard 环境中将 physical standby database 转成成 primary database 角色时,发生错误:

SQL> alter database commit to switchover to primary;
alter database commit to switchover to primary
*
ERROR at line 1:
ORA-16139: media recovery required


alert日志中报的错误信息为:

Tue Nov  5 15:31:19 2013
alter database commit to switchover to primary
Tue Nov  5 15:31:19 2013
ALTER DATABASE SWITCHOVER TO PRIMARY (TDB1)
Tue Nov  5 15:31:19 2013
If media recovery active, switchover will wait for completion
Database not available for switchover
  End-Of-REDO archived log file has been received
  End-Of-REDO archived log file has not been recovered
  Archived log files detected beyond End-Of-REDO
  Incomplete recovery SCN:0:667169 archive SCN:0:668379
Database not available for switchover
  End-Of-REDO archived log file has been received
  End-Of-REDO archived log file has not been recovered
  Archived log files detected beyond End-Of-REDO
  Incomplete recovery SCN:0:667169 archive SCN:0:668379
Switchover: Media recovery required - standby not in limbo
ORA-16139 signalled during: alter database commit to switchover to primary...


通过上面的信息可以看出来,archive log已经接收到了,但是还未进行恢复。 想了想后,我在切换前的几个小时,将physical standby database 的 Redo Apply 停掉了,所以才导致 接收到的 archive log 未被进行恢复。


登陆到physical standby database,启动Redo Apply,以应用这些从primary database接收到的archive log。

SQL> recover managed standby database disconnect from session;
Media recovery complete.

然后再switchover to primary:

SQL> alter database commit to switchover to primary;

Database altered.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值