oracle10g DataGuard switchover report ORA-16139

在 Oracle DataGuard 环境中,当尝试将物理备用数据库转换为主库角色时,由于在切换前几小时关闭了 Redo Apply 功能,导致接收到的归档日志未能被恢复。通过重新启动 Redo Apply 应用归档日志,并完成媒体恢复操作后,成功进行了数据库切换。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值