博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
批量处理物理备库出现archive gap
阅读量:2447 次
发布时间:2019-05-10

本文共 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恢复出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.
此时备库恢复正常

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

转载于:http://blog.itpub.net/15480802/viewspace-709084/

你可能感兴趣的文章
qca 指定频道 扫描_如何扫描(或重新扫描)电视上的频道
查看>>
不到运行当前操作系统的Android用户的0.4%
查看>>
如何从Linux Shell创建和安装SSH密钥
查看>>
如何快速将多个IP地址添加到Windows服务器
查看>>
哈夫曼会话加密_您是否正在使用带有加密会话的Facebook?
查看>>
chromebook刷机_如何关闭无响应的Chromebook应用
查看>>
贴片led发光电流_发光的国际象棋套装结合了LED,国际象棋和DIY电子产品的乐趣...
查看>>
如何在PowerPoint中使用变形过渡
查看>>
plex 乱码_Plex DVR现在提供传统的网格视图
查看>>
怎么在谷歌上下载影像数据_如何在Google WiFi上查看网络的数据使用情况
查看>>
obd ii 协议_如何设置自动Pro OBD-II适配器
查看>>
创建新的apple id_新的Apple Maps与Google Maps:哪个适合您?
查看>>
亚马逊移除订单_如何存档和更好地管理您的亚马逊订单
查看>>
apple pay 技术_如何在Apple Watch上设置和使用Apple Pay
查看>>
zimbra web 版本_如何获得Zimbra的版本?
查看>>
如何在Python中将纪元时间戳转换为人类可读的日期格式?
查看>>
gdb32和gdb_GDB备忘单
查看>>
xen nfs挂载_如何在没有Xen的Linux上附加和挂载Xen DomU的磁盘分区?
查看>>
caliber读书软件_如何在无头服务器上运行gitbook(使Caliber在无头服务器上运行)?...
查看>>
Windows 7 64位无法在状态码为0xc0000225的VirtualBox / Linux上安装
查看>>