Archivelog restore complete. Elapsed time: 0:00:19

来源:互联网 发布:linux get请求url 编辑:程序博客网 时间:2024/06/10 08:13

物理备库出现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恢复出archivelog
RMAN> restore archivelog from sequence 122309 until sequence 122325 thread 1;

Starting restore at 13-OCT-11
using channel ORA_DISK_1

channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=122309
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=122310
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=122311
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=122312
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=122313
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=122314
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=122315
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=122316
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=122317
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=122318
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=122319
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=122320
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=122321
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=122322
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=122323
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=122324
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=122325
channel ORA_DISK_1: reading from backup piece /data/backup/j9movv4f_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/data/backup/j9movv4f_1_1 tag=TAG20111013T082342
channel ORA_DISK_1: restore complete, elapsed time: 00:00:56
Finished restore at 13-OCT-11

此时alertlog相应记录为
Thu Oct 13 10:34:38 CST 2011
Archivelog 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 2011
Archivelog 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.
此时备库恢复正常
原创粉丝点击