failover遇到ORA-16171、ORA-16139错误及ACTIVATE STANDBY DATABASE
Apr112014
今天遇到这样一个需求,两节点的RAC+两节点的RAC的DG环境,主库在做一些操作的时候,不能让备库应用日志,所以备库的MRP进程关闭了,但是可以正常接收日志,主库做完操作后确认操作失败,备库需要failover切换成主库,之前的主库重建为备库,为了不让备库应用主库传过来的错误日志,在存储上删掉了主库传过来的归档日志。
案例环境:OEL 5.5,ORACLE 10.2.0.4.0
在执行recover finish时报错。
SQL> alter database recover managed standby database finish force; alter database recover managed standby database finish force * ERROR at line 1: ORA-00283: recovery session canceled due to errors ORA-16171: RECOVER...FINISH not allowed due to gap for thr 2, seq 12-26
此时无法failover切换。
SQL> alter database commit to switchover to primary; alter database commit to switchover to primary * ERROR at line 1: ORA-16139: media recovery required
在做不完全恢复后,还是不能切换。
SQL> recover standby database until cancel; ORA-00279: change 235858 generated at 03/19/2014 08:33:10 needed for thread 2 ORA-00289: suggestion : +DATA ORA-00280: change 235858 for thread 2 is in sequence #12 Specify log: {=suggested | filename | AUTO | CANCEL} CANCEL Media recovery cancelled. SQL> alter database commit to switchover to primary; alter database commit to switchover to primary * ERROR at line 1: ORA-16139: media recovery required
这时要想打开备库,就需要使用ACTIVATE STANDBY DATABASE功能了。
SQL> alter database ACTIVATE STANDBY DATABASE; Database altered.
此时数据库就是一个独立的数据库了。
SQL> select database_role,open_mode from v$database; DATABASE_ROLE OPEN_MODE ---------------- ---------- PRIMARY MOUNTED SQL> alter database open; Database altered. SQL> select database_role,open_mode from v$database; DATABASE_ROLE OPEN_MODE ---------------- ---------- PRIMARY READ WRITE
———————————————–end——————————————————
【上一篇】limit配置错误导致Resource temporarily unavailable错误
【下一篇】ASMCA detected pre 11gR2 ASM, but it does not have a local instance configured on this node
【下一篇】ASMCA detected pre 11gR2 ASM, but it does not have a local instance configured on this node
太专业了吧,有木有
2014-04-13 19:20