欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
數據恢復:如何用BBED模擬Oracle壞塊學(xué)習恢復技能

BBED是Block Browser/Editor的縮寫(xiě),是Oracle的一個(gè)內部工具,不對外發(fā)布文檔及支持。 BBED隨軟件發(fā)布,但是我們需要進(jìn)行簡(jiǎn)單的relink才能使用。

雖然BBED工具的使用存在很多風(fēng)險,但是如果利用得當,可以以之解決很多棘手的問(wèn)題,并且可以練習壞塊修復等技術(shù)。

例如在Oracle10g中的bbed工具,同樣需要我們手工relink才能使用,這個(gè)版本的工具同樣可以在其他版本的數據庫中使用:

[oracle@danaly lib]$ make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed

Linking BBED utility (bbed)

rm -f /opt/oracle/product/10.2.0/rdbms/lib/bbed

gcc -o /opt/oracle/product/10.2.0/rdbms/lib/bbed ...

   -L/opt/oracle/product/10.2.0/lib

[oracle@danaly lib]$ bbed

Password: 

BBED: Release 2.0.0.0.0 - Limited Production on Sun Sep 3 12:42:59 2006

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

************* !!! For Oracle Internal Use only !!! ***************

BBED> help ALL

SET DBA [ dba | file#, block# ]

SET FILENAME 'filename'

SET FILE file#

SET BLOCK [+/-]block#

SET OFFSET [ [+/-]byte offset | symbol | *symbol ]

SET BLOCKSIZE bytes

SET LIST[FILE] 'filename'

SET WIDTH character_count

SET COUNT bytes_to_display

SET IBASE [ HEX | OCT | DEC ]

SET OBASE [ HEX | OCT | DEC ]

SET MODE  [ BROWSE | EDIT ]

SET SPOOL [ Y | N ]

SHOW [  | ALL ]

POP [ALL]

REVERT [ DBA | FILE | FILENAME | BLOCK ]

UNDO

HELP [  | ALL ]

VERIFY [ DBA | FILE | FILENAME | BLOCK ]

CORRUPT [ DBA | FILE | FILENAME | BLOCK ]

Oracle Database 11g中缺省的未提供BBED庫文件,但是可以用10g的文件編譯出來(lái),參考如下步驟:

1.復制Oracle 10g文件

Copy $ORA10g_HOME/rdbms/lib/ssbbded.o to $ORA11g_HOME/rdbms/lib

Copy $ORA10g_HOME/rdbms/lib/sbbdpt.o to $ORA11g_HOME/rdbms/lib

Copy $ORA10g_HOME/rdbms/mesg/bbedus.msb to $ORA11g_HOME/rdbms/mesg

Copy $ORA10g_HOME/rdbms/mesg/bbedus.msg to $ORA11g_HOME/rdbms/mesg

Copy $ORA10g_HOME/rdbms/mesg/bbedar.msb to $ORA11g_HOME/rdbms/mesg

2.編譯

make -f $ORA11g_HOME/rdbms/lib/ins_rdbms.mk BBED=$ORACLE_HOME/bin/bbed $ORACLE_HOME/bin/bbed

BBED的缺省口令為blockedit,請謹慎使用,內部工具。Oracle不做技術(shù)支持。

我前面提到,可以通過(guò)這個(gè)工具模擬壞塊,以便進(jìn)行壞塊相關(guān)的學(xué)習和研究,以下是一個(gè)示例.

1.備份數據文件

本測試中恢復損壞的文件,需要存在一個(gè)良好文件,本文簡(jiǎn)單冷備份一下文件.

[oracle@jumper conner]$ cp users01.dbf users01.dbf.bak

2.修改BBED參數文件

加入備份文件

[oracle@jumper conner]$ vi filelist.txt 

         1 /opt/oracle/oradata/conner/system01.dbf       440401920

         2 /opt/oracle/oradata/conner/undotbs01.dbf      104857600

         3 /opt/oracle/oradata/conner/users01.dbf        27262976

         4 /opt/oracle/oradata/conner/users01.dbf.bak    27262976

~

~

~

"filelist.txt" 4L, 259C written    

[oracle@jumper conner]$ more par.bbd blocksize=8192listfile=filelist.txtmode=edit

3.破壞數據塊

[oracle@jumper conner]$ bbed parfile=par.bbd 

Password: 

BBED: Release 2.0.0.0.0 - Limited Production on Sun Sep 11 22:30:11 2005

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

************* !!! For Oracle Internal Use only !!! ***************

BBED> set file 3

        FILE#           3

BBED> modify 1000 file 3 block 17

Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) Y

 File: /opt/oracle/oradata/conner/users01.dbf (3)

 Block: 17               Offsets:    0 to  511           Dba:0x00c00011

------------------------------------------------------------------------

 03e80000 1100c000 75b5a320 00000104 06300000 01000000 611e0000 72b5a320 

 00000000 03003201 0900c000 ffff0000 00000000 00000000 00000000 00800000 

 72b5a320 00000000 00000000 00000000 00000000 00000000 00000000 00000000 

 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00012600 

 ffff5e00 d5037703 77030000 2600c21e 101e581d a91cf61b 471b941a dd192819 

 6218b417 06175216 9715dd14 26146c13 b4120712 44118310 bc0ffa0e 380e790d 

 b60cf40b 350b790a c0090409 45088b07 cc060e06 57059804 d5030000 00000000 

 <32 bytes per line>

BBED> verify

DBVERIFY - Verification starting

FILE = /opt/oracle/oradata/conner/users01.dbf

BLOCK = 17

Block 17 is corrupt

***

Corrupt block relative dba: 0x00c00011 (file 0, block 17)

Bad header found during verification

Data in bad block -

 type: 3 format: 0 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: 0xea05

 spare1: 0x0, spare2: 0x0, spare3: 0x0

***

BBED> quit

4.從備份文件中copy良好數據塊進(jìn)行恢復

[oracle@jumper conner]$ bbed parfile=par.bbd 

Password: 

BBED: Release 2.0.0.0.0 - Limited Production on Sun Sep 11 22:33:55 2005

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

************* !!! For Oracle Internal Use only !!! ***************

BBED> set file 4

        FILE#           4

BBED> show

        FILE#           4

        BLOCK#          1

        OFFSET          0

        DBA             0x01000001 (16777217 4,1)

        FILENAME        /opt/oracle/oradata/conner/users01.dbf.bak

        BIFILE          bifile.bbd

        LISTFILE        filelist.txt

        BLOCKSIZE       8192

        MODE            Edit

        EDIT            Unrecoverable

        IBASE           Dec

        OBASE           Dec

        WIDTH           80

        COUNT           512

        LOGFILE         log.bbd

        SPOOL           No

BBED> copy file 4 block 17 to file 3 block 17;

Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) Y

 File: /opt/oracle/oradata/conner/users01.dbf (3)

 Block: 17               Offsets:    0 to  511           Dba:0x00c00011

------------------------------------------------------------------------

 06020000 1100c000 75b5a320 00000104 06300000 01000000 611e0000 72b5a320 

 00000000 03003201 0900c000 ffff0000 00000000 00000000 00000000 00800000 

 72b5a320 00000000 00000000 00000000 00000000 00000000 00000000 00000000 

 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00012600 

 ffff5e00 d5037703 77030000 2600c21e 101e581d a91cf61b 471b941a dd192819 

 6218b417 06175216 9715dd14 26146c13 b4120712 44118310 bc0ffa0e 380e790d 

 b60cf40b 350b790a c0090409 45088b07 cc060e06 57059804 d5030000 00000000 

 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 

 <32 bytes per line>

BBED> verify

DBVERIFY - Verification starting

FILE = /opt/oracle/oradata/conner/users01.dbf

BLOCK = 17

DBVERIFY - Verification complete

Total Blocks Examined         : 1

Total Blocks Processed (Data) : 1

Total Blocks Failing   (Data) : 0

Total Blocks Processed (Index): 0

Total Blocks Failing   (Index): 0

Total Blocks Empty            : 0

Total Blocks Marked Corrupt   : 0

Total Blocks Influx           : 0

這樣就通過(guò)一個(gè)完好文件的完好數據塊復制,完成了簡(jiǎn)單的復制恢復。

5.數據庫驗證

原文鏈接里包含詳細的表創(chuàng )建和其他步驟,供參考。

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> alter tablespace users offline;

Tablespace altered.

SQL> alter tablespace users online;

Tablespace altered.

SQL> select count(*) from bbed;

  COUNT(*)

----------

       523

善用BBED可以從很多棘手的問(wèn)題中拯救我們的數據庫,作為Oracle DBA需要了解這樣一個(gè)工具的存在。

如何加入"云和恩墨大講堂"微信群
本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
基于rman的壞塊恢復
偷梁換柱 | 無(wú)備份情況下的數據恢復實(shí)踐
應對RMAN-06026錯誤,使用dbms_backup_restore進(jìn)行恢復
Oracle數據塊損壞恢復總結
oracle安裝目錄的各文件夾
Oracle 重要文件系統解釋 - 爪哇一角 - BlogJava
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久