一次資料檔案頭不一致恢複,資料頭不一致恢複

來源:互聯網
上載者:User

一次資料檔案頭不一致恢複,資料頭不一致恢複

SYS@orcl11g>alter database datafile 6 online;alter database datafile 6 online*ERROR at line 1:ORA-01113: file 6 needs media recoveryORA-01110: data file 6: '/opt/oracle/oradata/orcl11g/zbdba01.dbf'
有時候我們資料檔案offline之後,再online需要介質恢複    
SYS@orcl11g>select file#,name,status from v$datafile;     FILE# NAME                                                         STATUS---------- ------------------------------------------------------------ ------------------------------------------------------------         1 /opt/oracle/oradata/orcl11g/system01.dbf                     SYSTEM         2 /opt/oracle/oradata/orcl11g/sysaux01.dbf                     ONLINE         3 /opt/oracle/oradata/orcl11g/undotbs01.dbf                    ONLINE         4 /opt/oracle/oradata/orcl11g/users01.dbf                      ONLINE         5 /opt/oracle/oradata/orcl11g/zbdba.dbf                        ONLINE         6 /opt/oracle/oradata/orcl11g/zbdba01.dbf                      RECOVER         7 /opt/oracle/oradata/orcl11g/test.dbf                         ONLINE
但是我們歸檔已經丟失,無法完成介質恢複:
SYS@orcl11g>recover datafile 6;ORA-00279: change 1986632 generated at 10/28/2014 05:16:11 needed for thread 1ORA-00289: suggestion : /opt/oracle/flash_recovery_area/ORCL11G/archivelog/2014_10_28/o1_mf_1_74_b4yqrglr_.arcORA-00280: change 1986632 for thread 1 is in sequence #74Specify log: {<RET>=suggested | filename | AUTO | CANCEL}ORA-00308: cannot open archived log '/opt/oracle/flash_recovery_area/ORCL11G/archivelog/2014_10_28/o1_mf_1_74_b4yqrglr_.arc'ORA-27037: unable to obtain file statusLinux-x86_64 Error: 2: No such file or directoryAdditional information: 3
所以這時候我們直接修改檔案頭進行online:
[oracle@ogg1 lib]$ bbed parfile=par.txtPassword:BBED: Release 2.0.0.0.0 - Limited Production on Tue Oct 28 05:20:19 2014Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.************* !!! For Oracle Internal Use only !!! ***************BBED>BBED>BBED> info allFile#  Name                                                        Size(blks)-----  ----                                                        ----------     1  /opt/oracle/oradata/orcl11g/system01.dbf                             0     2  /opt/oracle/oradata/orcl11g/sysaux01.dbf                             0     3  /opt/oracle/oradata/orcl11g/undotbs01.dbf                            0     4  /opt/oracle/oradata/orcl11g/users01.dbf                              0     5  /opt/oracle/oradata/orcl11g/zbdba.dbf                                0     6  /opt/oracle/oradata/orcl11g/zbdba01.dbf                              0     7  /opt/oracle/oradata/orcl11g/test.dbf                                 0BBED> set file 1 block 1        FILE#           1        BLOCK#          1BBED> p kcvfhckpstruct kcvfhckp, 36 bytes                   @484       struct kcvcpscn, 8 bytes                 @484          ub4 kscnbas                           @484      0x001e526c      ub2 kscnwrp                           @488      0x0000   ub4 kcvcptim                             @492      0x3362e202   ub2 kcvcpthr                             @496      0x0001   union u, 12 bytes                        @500          struct kcvcprba, 12 bytes             @500             ub4 kcrbaseq                       @500      0x0000004d         ub4 kcrbabno                       @504      0x000001a6         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> p kcvfhcpcub4 kcvfhcpc                                @140      0x000000f9BBED> p kcvfhcccub4 kcvfhccc                                @148      0x000000f8BBED> set file 6 block 1        FILE#           6        BLOCK#          1BBED> p kcvfhckpstruct kcvfhckp, 36 bytes                   @484       struct kcvcpscn, 8 bytes                 @484          ub4 kscnbas                           @484      0x001e5048      ub2 kscnwrp                           @488      0x0000   ub4 kcvcptim                             @492      0x3362e11b   ub2 kcvcpthr                             @496      0x0001   union u, 12 bytes                        @500          struct kcvcprba, 12 bytes             @500             ub4 kcrbaseq                       @500      0x0000004a         ub4 kcrbabno                       @504      0x00005801         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> p kcvfhcpcub4 kcvfhcpc                                @140      0x0000043cBBED> p kcvfhcccub4 kcvfhccc                                @148      0x0000043bBBED> modify /x 6c52 offset 484Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) yFile: /opt/oracle/oradata/orcl11g/zbdba01.dbf (6)Block: 1                Offsets:  484 to  995           Dba:0x01800001------------------------------------------------------------------------6c521e00 00000000 1be16233 01000000 4a000000 01580000 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> modify /x 02e2 offset 492File: /opt/oracle/oradata/orcl11g/zbdba01.dbf (6)Block: 1                Offsets:  492 to 1003           Dba:0x01800001------------------------------------------------------------------------02e26233 01000000 4a000000 01580000 10000000 02000000 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 0d000d00 0d00010000000000 00000000 00000000 02008001 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> modify /x f900 offset 140File: /opt/oracle/oradata/orcl11g/zbdba01.dbf (6)Block: 1                Offsets:  140 to  651           Dba:0x01800001------------------------------------------------------------------------f9000000 7fe16233 3b040000 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 0000000006000000 05005a42 44424100 00000000 00000000 00000000 00000000 0000000000000000 06000000 00000000 00000000 a3d96233 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 6b946b29 01000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 6c521e00 0000000002e26233 01000000 4a000000 01580000 10000000 02000000 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 0d000d00 0d000100<32 bytes per line>BBED> modify /x f800 offset 148File: /opt/oracle/oradata/orcl11g/zbdba01.dbf (6)Block: 1                Offsets:  148 to  659           Dba:0x01800001------------------------------------------------------------------------f8000000 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 06000000 05005a4244424100 00000000 00000000 00000000 00000000 00000000 00000000 0600000000000000 00000000 a3d96233 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 6b946b29 01000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 6c521e00 00000000 02e26233 010000004a000000 01580000 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 00000000<32 bytes per line>BBED> sum applyCheck value for File 6, Block 1:current = 0x1924, required = 0x1924BBED> 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          148        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> p kcvfhckpstruct kcvfhckp, 36 bytes                   @484       struct kcvcpscn, 8 bytes                 @484          ub4 kscnbas                           @484      0x001e526c      ub2 kscnwrp                           @488      0x0000   ub4 kcvcptim                             @492      0x3362e202   ub2 kcvcpthr                             @496      0x0001   union u, 12 bytes                        @500          struct kcvcprba, 12 bytes             @500             ub4 kcrbaseq                       @500      0x0000004a         ub4 kcrbabno                       @504      0x00005801         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> p kcvfhcpcub4 kcvfhcpc                                @140      0x000000f9BBED> p kcvfhcccub4 kcvfhccc                                @148      0x000000f8BBED> 
修改完成後我們再次恢複該資料檔案:
SYS@orcl11g>startupORACLE instance started.Total System Global Area  417546240 bytesFixed Size                  2213936 bytesVariable Size             318769104 bytesDatabase Buffers           92274688 bytesRedo Buffers                4288512 bytesDatabase mounted.Database opened.SYS@orcl11g>recover datafile 6;Media recovery complete.SYS@orcl11g>alter database datafile 6 online;Database altered.






一年前刪除的圖片檔案夾現在恢複不了,是不是資料被覆蓋一次之後一般人都恢複不了的,

不是圖片很難恢複,是你間隔的時間太長了。首先你的圖片檔案夾原先在哪個盤放著的?如果在C盤,應該是沒有什麼希望了,肯定被覆蓋過了,因為c盤是系統硬碟,你即使不寫入東西,不下載東西,系統是不斷產生一些臨時檔案的,所以c盤丟失的檔案很難找回。如果你放著其他盤,一年之內沒往這個盤寫過資料的話,還是有希望恢複的,如果你刪除的檔案夾不在C盤的話,你可以從網上下載一個資料恢複精靈試試,這款軟體的恢複能力是相當強的,你可以按檔案類型恢複,如果連它也掃描不到你要的檔案,多半是被覆蓋了,恢複不了了。
 
我用easyrecovery恢複資料,用格式化恢複方式恢複兩次,但是搜尋到到檔案總大小不一樣……

easyrecovery有一個預設的設定是不會在被刪除盤下恢複,所以無法恢複出來,而磁碟資訊儲存了被刪除的檔案,這一次被你讀寫後檔案資訊被毀壞,所以可回複量減低,而且easyrecovery本身就只是一個民用的資訊恢複軟體,其效率本來就不高,一般只能恢複被刪除再寫入3遍後的來源硬碟,所以就不行了,目前德國除了幾個效果更好一點恢複軟體,俄羅斯也有,我給你名字,自己搜一下,如果你錢比較多的話可以考慮專業修複,專業修複使用了特種裝置,價格大概在3G資料2000元左右,其復原在較理想情況下可以接近軍兩年前用技術五十次復原。以下是軟體名稱:Acronis_Backup_and_Recovery、AltDataRecovery,偶爾可以即時Final Data雖然比較老,但是也還行,希望能幫到你。
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.