DG主备库转换时出现ORA-16416

DG主备库转换时出现ORA-16416: 的错误

 

SQL> select name,database_role,open_mode,switchover_status from v$database;

 

NAME      DATABASE_ROLE    OPEN_MODE  SWITCHOVER_STATUS

--------- ---------------- ---------- --------------------

ORCL      PRIMARY          READ WRITE SESSIONS ACTIVE

 

SQL> alter database commit to switchover to physical standby with session shutdown;

alter database commit to switchover to physical standby with session shutdown

*

ERROR at line 1:

ORA-16416: Switchover target is not synchronized with the primary

 

SQL> !oerr ora 16416

16416, 00000, "Switchover target is not synchronized with the primary"

// *Cause:  The switchover target incurred an error or has a gap at the time

//          the switchover operation was attempted.

// *Action: Allow the switchover target to become synchronized and then

//          re-attempt the switchover.

 

解决办法:

 

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

 

SQL> startup

ORACLE instance started.

 

Total System Global Area  167772160 bytes

Fixed Size                  1218316 bytes

Variable Size              62916852 bytes

Database Buffers          100663296 bytes

Redo Buffers                2973696 bytes

Database mounted.

 

重现创建备库的控制文件,并将备份的控制文件替换掉

 

SQL>alter database create standby controlfile as '/data/rman_backup/sdtby_control01.ctl';

 

SQL> alter database open;

 

将新的控制文件图换到备库后在备库上执行一次REDO应用

 

SQL> select status from v$instance;

 

STATUS

------------

MOUNTED

 

SQL> alter database recover managed standby database disconnect from session;

 

Database altered.

 

SQL> alter database recover managed standby database cancel;

 

Database altered.

 

主库上再次执行切换即可

 

SQL> alter database commit to switchover to physical standby with session shutdown;

 

Database altered.

 

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29320885/viewspace-1097960/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29320885/viewspace-1097960/

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值