本文共 3730 字,大约阅读时间需要 12 分钟。
物理备库出现gap,主库为5节点RAC,数据库版本10.2.0.5
登录物理备库
SQL> select * from v$archive_gap;THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#
---------- ------------- -------------- 1 122309 122325 3 3517 3525发现gap比较多,以前出现一个archive gap的时候,我们通常是在RAC主库使用rman命令copy,即将ASM格式的archivelog改为普通格式的,然后传到备库register并recover这次gap太多,用这个方法太慢了,更换一个在主库一个节点上rman执行backup archivelog from sequence 122309 until sequence 122325 thread 1;backup archivelog from sequence 3517 until sequence 3525 thread 3;然后将备份集传到备库先使用catalog start with将这两个备份集注册到控制文件,然后使用restore恢复出archivelogRMAN> restore archivelog from sequence 122309 until sequence 122325 thread 1;Starting restore at 13-OCT-11
using channel ORA_DISK_1channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive logarchive log thread=1 sequence=122309channel ORA_DISK_1: restoring archive logarchive log thread=1 sequence=122310channel ORA_DISK_1: restoring archive logarchive log thread=1 sequence=122311channel ORA_DISK_1: restoring archive logarchive log thread=1 sequence=122312channel ORA_DISK_1: restoring archive logarchive log thread=1 sequence=122313channel ORA_DISK_1: restoring archive logarchive log thread=1 sequence=122314channel ORA_DISK_1: restoring archive logarchive log thread=1 sequence=122315channel ORA_DISK_1: restoring archive logarchive log thread=1 sequence=122316channel ORA_DISK_1: restoring archive logarchive log thread=1 sequence=122317channel ORA_DISK_1: restoring archive logarchive log thread=1 sequence=122318channel ORA_DISK_1: restoring archive logarchive log thread=1 sequence=122319channel ORA_DISK_1: restoring archive logarchive log thread=1 sequence=122320channel ORA_DISK_1: restoring archive logarchive log thread=1 sequence=122321channel ORA_DISK_1: restoring archive logarchive log thread=1 sequence=122322channel ORA_DISK_1: restoring archive logarchive log thread=1 sequence=122323channel ORA_DISK_1: restoring archive logarchive log thread=1 sequence=122324channel ORA_DISK_1: restoring archive logarchive log thread=1 sequence=122325channel ORA_DISK_1: reading from backup piece /data/backup/j9movv4f_1_1channel ORA_DISK_1: restored backup piece 1piece handle=/data/backup/j9movv4f_1_1 tag=TAG20111013T082342channel ORA_DISK_1: restore complete, elapsed time: 00:00:56Finished restore at 13-OCT-11此时alertlog相应记录为
Thu Oct 13 10:34:38 CST 2011Archivelog restore complete. Elapsed time: 0:00:19 Archivelog restore complete. Elapsed time: 0:00:21 Archivelog restore complete. Elapsed time: 0:00:21 Archivelog restore complete. Elapsed time: 0:00:21 Archivelog restore complete. Elapsed time: 0:00:21 Archivelog restore complete. Elapsed time: 0:00:22 Archivelog restore complete. Elapsed time: 0:00:22 Archivelog restore complete. Elapsed time: 0:00:22 Thu Oct 13 10:35:00 CST 2011Archivelog restore complete. Elapsed time: 0:00:20 Archivelog restore complete. Elapsed time: 0:00:22 Archivelog restore complete. Elapsed time: 0:00:22 Archivelog restore complete. Elapsed time: 0:00:22 Archivelog restore complete. Elapsed time: 0:00:22 Archivelog restore complete. Elapsed time: 0:00:21 Archivelog restore complete. Elapsed time: 0:00:21 Archivelog restore complete. Elapsed time: 0:00:21 Archivelog restore complete. Elapsed time: 0:00:02 此时v$archive_gap已经没有了记录SQL> select * from v$archive_gap;no rows selected
但是recover进程不会自动恢复这些log,需要先cancel再开启SQL> recover managed standby database cancel;Media recovery complete.SQL> recover managed standby database using current logfile disconnect from session;Media recovery complete.此时备库恢复正常来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15480802/viewspace-709084/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/15480802/viewspace-709084/