亚洲精品久久久中文字幕-亚洲精品久久片久久-亚洲精品久久青草-亚洲精品久久婷婷爱久久婷婷-亚洲精品久久午夜香蕉

您的位置:首頁技術(shù)文章
文章詳情頁

Oracle內(nèi)部工具Block Corruption介紹

瀏覽:97日期:2023-11-13 10:30:53
有人在Google新聞組上提出了一個問題:“How can I get the BBED passWord?”,繼而引發(fā)了一場很有意思的討論。 后來Pete Finnigan也在他的Blog寫了一篇文章'An interesting thread on Oracle-l about BBED'描述這次有意思的探討。 在討論中,有一個有趣的觀點提到,假如這個工具被廣泛傳播,那么可能有些人不是用BBED來修復(fù)數(shù)據(jù),意外的破壞可能更為多見。最終的后果可能是Oracle徹底把這個工具移除。BBED是Block Browser/Editor的縮寫,是Oracle的一個內(nèi)部工具,不對外發(fā)布文檔及支持。BBED隨軟件發(fā)布,但是我們需要進行簡單的relink才能使用,relink請參考:How to compile Oracle10g BBED tools. 雖然BBED工具的使用存在很多風(fēng)險,但是假如利用得當(dāng),可以以之解決很多棘手的問題。本文簡單介紹一下如何用BBED模擬壞塊,以練習(xí)壞塊修復(fù)等技術(shù),此前我曾經(jīng)介紹過另外一種方法,請參考:Oracle中模擬及修復(fù)數(shù)據(jù)塊損壞 1.創(chuàng)建測試表 [oracle@jumper conner]$ sqlplus '/ as sysdba'SQL*Plus: Release 9.2.0.4.0 - ProdUCtion on Sun Sep 11 19:59:27 2005Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.Connected to:Oracle9i Enterprise Edition Release 9.2.0.4.0 - ProductionWith the Partitioning optionJServer Release 9.2.0.4.0 - ProductionSQL> create table bbed tablespace users as select * from dba_tables;Table created.SQL> select count(*) from bbed;COUNT(*)523SQL> col segment_name for a10SQL> select segment_name,file_id,block_id from dba_extents where segment_name='BBED';SEGMENT_NA FILE_ID BLOCK_ID---------- ---------- ----------BBED 39BBED 3 17BBED 3 25SQL> select count(*) from bbed;COUNT(*)5232.創(chuàng)建BBED參數(shù)文件等。 [oracle@jumper conner]$ more filelist.txt1 /opt/oracle/oradata/conner/system01.dbf 4404019202 /opt/oracle/oradata/conner/undotbs01.dbf 1048576003 /opt/oracle/oradata/conner/users01.dbf 27262976[oracle@jumper conner]$ more par.bbdblocksize=8192listfile=filelist.txtmode=edit3.使用BBED [oracle@jumper conner]$ bbed parfile=par.bbdPassword:BBED: Release 2.0.0.0.0 - Limited Production on Sun Sep 11 20:01:01 2005 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. ************* !!! For Oracle Internal Use only !!! *************** BBED> set file 3FILE# 3 BBED> showFILE# 3BLOCK#1OFFSET0DBA 0x00c00001 (12582913 3,1)FILENAME/opt/oracle/oradata/conner/users01.dbfBIFILEbifile.bbdLISTFILEfilelist.txtBLOCKSIZE 8192MODE EditEDIT UnrecoverableIBASE DecOBASE DecWIDTH 80COUNT 512LOGFILE log.bbdSPOOL No4.回滾誤操作 假如操作中發(fā)生誤操作,可以使用revert命令回滾。 BBED> modify /x 0x00c00011 File: /opt/oracle/oradata/conner/users01.dbf (3) Block: 1 Offsets: 1000 to 1511 Dba:0x00c00001------------------------------------------------------------------------ 00c00011 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 <32 bytes per line> BBED> revertAll changes made in this session will be rolled back. Proceed? (Y/N) YReverted file '/opt/oracle/oradata/conner/users01.dbf', block 1Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) Y5.改寫數(shù)據(jù)塊 模擬壞塊: BBED> modify 1000 file 3 block 17 File: /opt/oracle/oradata/conner/users01.dbf (3) Block: 17 Offsets: 1000 to 1511 Dba:0x00c00011------------------------------------------------------------------------ 03e80000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 002c002f 03535953 18415050 4c59245f 434f4e46 5f48444c 525f434f 4c554d4e 53065359 5354454d ffff02c1 0b02c129 02c10203 c2033804 c3073825 ff02c102 06c51630 31252eff 02c10202 c1020359 4553014e ffffffff ffffffff 0a202020 20202020 2020310a 20202020 20202020 20310520 2020204e 07454e41 424c4544 ffff024e 4fff014e 014e024e 4f074445 4641554c 54084449 5341424c 4544024e 4f024e4f ff084449 5341424c 4544024e 4fff0844 49534142 4c454408 44495341 424c4544 2c002f03 53595314 4150504c 59245f45 52524f52 5f48414e 444c4552 06535953 54454dff ff02c10b 02c12902 c10203c2 033804c3 073825ff 02c10206 c5163031 252eff02 c10202c1 02035945 53014eff ffffffff ffffff0a 20202020 20202020 20310a20 20202020 20202020 31052020 20204e07 454e4142 4c4544ff ff024e4f ff014e01 4e024e4f 07444546 41554c54 08444953 41424c45 44024e4f 024e4fff 08444953 41424c45 44024e4f ff084449 5341424c 45440844 49534142 4c45442c 002f0353 59530c41 50504c59 245f4552 524f5206 <32 bytes per line>6.檢查數(shù)據(jù)塊損壞 使用verify命令,可以發(fā)現(xiàn)剛才修改的file 3 block 17已經(jīng)被標(biāo)記為損壞。 BBED> verifyDBVERIFY - Verification startingFILE = /opt/oracle/oradata/conner/users01.dbfBLOCK = 17 Block 17 is corrupt***Corrupt block relative dba: 0x00c00011 (file 0, block 17)Bad check value found during verificationData in bad block - type: 6 format: 2 rdba: 0x00c00011 last change scn: 0x0000.20a3b575 seq: 0x1 flg: 0x04 consistency value in tail: 0xb5750601 check value in block header: 0x3006, computed block checksum: 0xe803 spare1: 0x0, spare2: 0x0, spare3: 0x0*** DBVERIFY - Verification complete Total 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 : 1Total Blocks Influx : 0 BBED> quit7.使用DBV檢查 [oracle@jumper conner]$ dbv file=users01.dbf blocksize=8192 DBVERIFY: Release 9.2.0.4.0 - Production on Sun Sep 11 20:13:23 2005 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. DBVERIFY - Verification starting : FILE = users01.dbfPage 17 is marked corrupt***Corrupt block relative dba: 0x00c00011 (file 3, block 17)Bad check value found during dbv:Data in bad block - type: 6 format: 2 rdba: 0x00c00011 last change scn: 0x0000.20a3b575 seq: 0x1 flg: 0x04 consistency value in tail: 0xb5750601 check value in block header: 0x3006, computed block checksum: 0xe803 spare1: 0x0, spare2: 0x0, spare3: 0x0*** DBVERIFY - Verification complete Total Pages Examined : 128Total Pages Processed (Data) : 107Total Pages Failing (Data) : 0Total Pages Processed (Index): 0Total Pages Failing (Index): 0Total Pages Processed (Other): 20Total Pages Processed (Seg) : 0Total Pages Failing (Seg) : 0Total Pages Empty : 0Total Pages Marked Corrupt : 1Total Pages Influx : 08.全表掃描此時出現(xiàn)ORA-01578錯誤 重新啟動數(shù)據(jù)庫以后,執(zhí)行全表掃描,此時錯誤出現(xiàn): SQL> startup force;ORACLE instance started. Total System Global Area 101782828 bytesFixed Size 451884 bytesVariable Size 37748736 bytesDatabase Buffers 62914560 bytesRedo Buffers 667648 bytesDatabase mounted.Database opened.SQL> select count(*) from bbed;select count(*) from bbed *ERROR at line 1:ORA-01578: ORACLE data block corrupted (file # 3, block # 17)ORA-01110: data file 3: '/opt/oracle/oradata/conner/users01.dbf' SQL>以上方法僅供測試使用。
標(biāo)簽: Oracle 數(shù)據(jù)庫
主站蜘蛛池模板: 一级特黄特色aa大片 | 又黄又爽的成人免费视频播放 | 亚洲视频综合 | 国产成人精品男人的天堂538 | aa一级片 | 国产视频福利 | 国产精品福利一区 | 妹子草网 | 色婷婷狠狠五月综合天色拍 | 91精品欧美一区二区三区 | 国产剧情91| 久久乐国产精品亚洲综合m3u8 | 日本黄色一级片视频 | 国产精品国产福利国产秒拍 | 在线a人片免费观看国产 | 99在线观看国产 | 久久国产精品99精品国产 | 国模福利视频在线播放 | 亚洲精品女同一区二区三区 | 一级黄色激情片 | 九九99re在线视频精品免费 | 欧美精品做人一级爱免费 | 国产一久久香蕉国产线看观看 | 2019国内精品久久久久久 | 免费观看黄色小视频 | 五月花成人网 | 特黄又硬又大又粗又长 | 国产精品区网红主播在线观看 | 黄色的视频免费 | 亚洲精品97福利在线 | 国产精品视频色拍拍 | 无码精品日韩中文字幕 | 狼人久草 | 久久综合亚洲 | 亚洲精品tv | 国产毛片一区二区三区 | 伊人狼人久久 | 久久精品视频在线观看 | 全部免费特黄特色大片视频 | 狠狠色综合久久婷婷 | 久久91|