博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
跳过丢失归档进行恢复
阅读量:5967 次
发布时间:2019-06-19

本文共 6496 字,大约阅读时间需要 21 分钟。

在我们恢复的时候,发现中间缺失归档,大部分dba觉得从缺失的归档開始以后的归档都无法进行恢复。可是我们从很规的方式,改动数据文件相应的信息是能够跳过该缺失的归档,而且利用后面的归档进行恢复的。

SYS@orcl11g>recover datafile 6;ORA-00279: change 2054392 generated at 10/28/2014 23:20:14 needed for thread 1ORA-00289: suggestion : /opt/oracle/flash_recovery_area/ORCL11G/archivelog/2014_10_28/o1_mf_1_150_b50rqvq8_.arcORA-00280: change 2054392 for thread 1 is in sequence #150Specify log: {
=suggested | filename | AUTO | CANCEL}ORA-00326: log begins at change 2055246, need earlier change 2054392ORA-00334: archived log: '/opt/oracle/flash_recovery_area/ORCL11G/archivelog/2014_10_28/o1_mf_1_150_b50rqvq8_.arc'
这里我们发现相应的归档文件已经丢失。无法进行恢复
这里我们通过bbed仅仅须要改动两个地方就可以跳过该归档。使用下一个归档进行恢复:

BBED> p kcvfhckpstruct kcvfhckp, 36 bytes                   @484       struct kcvcpscn, 8 bytes                 @484          ub4 kscnbas                           @484      0x001f58f8      ub2 kscnwrp                           @488      0x0000   ub4 kcvcptim                             @492      0x3363df2e   ub2 kcvcpthr                             @496      0x0001   union u, 12 bytes                        @500          struct kcvcprba, 12 bytes             @500             ub4 kcrbaseq                       @500      0x00000095         ub4 kcrbabno                       @504      0x00000002         ub2 kcrbabof                       @508      0x0010   ub1 kcvcpetb[0]                          @512      0x02   ub1 kcvcpetb[1]                          @513      0x00   ub1 kcvcpetb[2]                          @514      0x00   ub1 kcvcpetb[3]                          @515      0x00   ub1 kcvcpetb[4]                          @516      0x00   ub1 kcvcpetb[5]                          @517      0x00   ub1 kcvcpetb[6]                          @518      0x00   ub1 kcvcpetb[7]                          @519      0x00BBED> modify /x 96 offset 500Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) yFile: /opt/oracle/oradata/orcl11g/zbdba01.dbf (6)Block: 1                Offsets:  500 to 1011           Dba:0x01800001------------------------------------------------------------------------96000000 02000000 10000000 02000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 0d000d00 0d000100 00000000 0000000000000000 02008001 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000<32 bytes per line>BBED> sum applyCheck value for File 6, Block 1:current = 0x6ce1, required = 0x6ce1BBED> verifyDBVERIFY - Verification startingFILE = /opt/oracle/oradata/orcl11g/zbdba01.dbfBLOCK = 1DBVERIFY - Verification completeTotal Blocks Examined         : 1Total Blocks Processed (Data) : 0Total Blocks Failing   (Data) : 0Total Blocks Processed (Index): 0Total Blocks Failing   (Index): 0Total Blocks Empty            : 0Total Blocks Marked Corrupt   : 0Total Blocks Influx           : 0Message 531 not found;  product=RDBMS; facility=BBEDBBED> show all        FILE#           6        BLOCK#          1        OFFSET          500        DBA             0x01800001 (25165825 6,1)        FILENAME        /opt/oracle/oradata/orcl11g/zbdba01.dbf        BIFILE          bifile.bbd        LISTFILE        filelist.txt        BLOCKSIZE       8192        MODE            Edit        EDIT            Unrecoverable        IBASE           Dec        OBASE           Dec        WIDTH           80        COUNT           512        LOGFILE         log.bbd        SPOOL           NoBBED> modify /x 1f5c4e offset 484File: /opt/oracle/oradata/orcl11g/zbdba01.dbf (6)Block: 1                Offsets:  484 to  995           Dba:0x01800001------------------------------------------------------------------------1f5c4e00 00000000 2edf6333 01000000 96000000 02000000 10000000 0200000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 000000000d000d00 0d000100 00000000 00000000 00000000 02008001 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000<32 bytes per line>BBED> sum applyCheck value for File 6, Block 1:current = 0x6857, required = 0x6857BBED> verifyDBVERIFY - Verification startingFILE = /opt/oracle/oradata/orcl11g/zbdba01.dbfBLOCK = 1DBVERIFY - Verification completeTotal Blocks Examined         : 1Total Blocks Processed (Data) : 0Total Blocks Failing   (Data) : 0Total Blocks Processed (Index): 0Total Blocks Failing   (Index): 0Total Blocks Empty            : 0Total Blocks Marked Corrupt   : 0Total Blocks Influx           : 0Message 531 not found;  product=RDBMS; facility=BBED
再次进行恢复:

SYS@orcl11g>SYS@orcl11g>SYS@orcl11g>recover datafile 6;Media recovery complete.SYS@orcl11g>SYS@orcl11g>SYS@orcl11g>SYS@orcl11g>SYS@orcl11g>alter database datafile 6 online;Database altered.在生产环境不到万不得已。请勿效仿

转载于:https://www.cnblogs.com/yutingliuyl/p/7082027.html

你可能感兴趣的文章
IE维护(IEM)策略不再适用于IE10及后续IE版本
查看>>
Java7中的ForkJoin并发框架初探(下)—— ForkJoin的应用
查看>>
java中的重量级与轻量级概念
查看>>
Linux设备驱动工程师之路——硬件访问及混杂设备LED驱动
查看>>
进程和线程<一>
查看>>
远程算数程序——版本v1.0
查看>>
Mysql常见四种索引的使用
查看>>
说说Android桌面(Launcher应用)背后的故事(一)——揭开她神秘的面纱
查看>>
第一篇:zc706 开箱及开发环境搭建
查看>>
python-冒泡排序
查看>>
Mac下修改Hosts文件工具——Gas Mask
查看>>
协程函数应用
查看>>
CSU Double Shortest Paths 湖南省第十届省赛
查看>>
webgl像机世界
查看>>
php正则怎么使用(最全最细致)
查看>>
javascript数学运算符
查看>>
LC.155. Min Stack(非优化,两个stack 同步 + -)
查看>>
Add Two Numbers
查看>>
Asp.net技巧:gridview获取当前行索引的方法
查看>>
让 vim 在按ESC时自动保存
查看>>