ITPub博客

首页 > 数据库 > Oracle > standby库,在sqlplus下用recover standby database进行手工恢复

standby库,在sqlplus下用recover standby database进行手工恢复

原创 Oracle 作者:westzq1984 时间:2014-02-25 14:30:15 0 删除 编辑
一个standby库出问题,丢了1个归档
检查主库的日志,发现丢失的归档的SEQ的redo还未被覆盖,马上将其拷贝出来传递到备库上

尝试catalog,虽然没有报错,但是实际没有注册成功
RMAN> catalog archivelog '/u01/app/oracle/oradata/ORCL/redo03_281.arc';                    

cataloged archived log
archived log file name=/u01/app/oracle/oradata/ORCL/redo03_281.arc RECID=297 STAMP=840464160

尝试使用sqlplus的recover命令来恢复,提示是standby controlfile,无法进行
SQL> recover database ;
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be done

SQL> recover database using backup controlfile;
ORA-00283: recovery session canceled due to errors
ORA-01666: control file is for a standby database

没找到sqlplus下recover命令的reference,最后瞎尝试,总算试了出来
SQL> recover standby database;                                                     <==
ORA-00279: change 1728518 generated at 06/08/2013 20:13:37 needed for thread 1
ORA-00289: suggestion :
/u01/app/oracle/fast_recovery_area/DGORCL/archivelog/2014_02_25/o1_mf_1_281_%u_.
arc
ORA-00280: change 1728518 for thread 1 is in sequence #281


Specify log: {=suggested | filename | AUTO | CANCEL}
/u01/app/oracle/oradata/ORCL/redo03_281.arc
ORA-00279: change 1729863 generated at 06/08/2013 20:14:03 needed for thread 1
ORA-00289: suggestion :
/u01/app/oracle/fast_recovery_area/DGORCL/archivelog/2014_02_25/o1_mf_1_282_9jrd
kdb4_.arc
ORA-00280: change 1729863 for thread 1 is in sequence #282
ORA-00278: log file '/u01/app/oracle/oradata/ORCL/redo03_281.arc' no longer
needed for this recovery


Specify log: {=suggested | filename | AUTO | CANCEL}
cancel
Media recovery cancelled.

恢复该归档后,DG恢复正常。

其实,还有个解决办法,从主库生成一个控制文件备份过来,用该控制文件mount库,就可以用recover database using backup controlfile进行恢复
这个案例中可以看到,redo log拷贝出来后,是无法作为archivelog给catalog进控制文件的

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

上一篇: Quorum FailGroup
请登录后发表评论 登录
全部评论

注册时间:2009-04-06

  • 博文量
    251
  • 访问量
    953163