使用BBED破壞資料(oracle11g)
1.編輯BBED(11g不支援了,需要從10g copy過來)
Copy $ORA10g_HOME/rdbms/lib/ssbbded.o to $ORA11g_HOME/rdbms/lib
Copy $ORA10g_HOME/rdbms/lib/sbbdpt.o to $ORA11g_HOME/rdbms/lib
Message files (list may differ):
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(這個不一定需要)
[oracle@deer ~]$ cd /u01/oracle/product/11.2.0/dbhome_1/rdbms/lib/
[oracle@deer lib]$ make -f ins_rdbms.mk /u01/oracle/product/11.2.0/dbhome_1/rdbms/lib/bbed
[oracle@deer lib]$ ll bbed
-rwxr-xr-x 1 oracle oinstall 262152 Jun 10 12:14 bbed
2.使用bbed
[oracle@rac10g2 lib]$ ./bbed
Password: --->blockedit
BBED: Release 2.0.0.0.0 - Limited Production on Sun Jun 10 02:58:00 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
************* !!! For Oracle Internal Use only !!! ***************
BBED>
3.create table test( id number(2),name varchar2(20))
insert into test values(10,'bruce')
insert into test values(20,'deer')
select * from test
select rowid,test.* from test
select dbms_rowid.rowid_relative_fno('AAAM8EAABAAAPCCAAA'),
dbms_rowid.rowid_block_number('AAAM8EAABAAAPCCAAA') from dual
select dbms_rowid.rowid_relative_fno('AAAM8EAABAAAPCCAAB'),
dbms_rowid.rowid_block_number('AAAM8EAABAAAPCCAAB') from dual
--查詢file id,block id
4.建立bbed.par檔案
[oracle@deer lib]$ cat bbed.par
blocksize=8192
listfile=bbedlist
mode=edit
-----》其中bbedlist的內容為
[oracle@deer lib]$ cat bbedlist
1 /u01/oradata/deer/system01.dbf 7759462402
2 /u01/oradata/deer/sysaux01.dbf 838860800
5.連線bbed
[oracle@deer lib]$ ./bbed parfile=bbed.par
Password:
BBED: Release 2.0.0.0.0 - Limited Production on Sun Jun 10 12:30:35 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
************* !!! For Oracle Internal Use only !!! ***************
BBED>
BBED> set dba 1,91761
DBA 0x00416671 (4286065 1,91761)
BBED> find /c bruce
File: /u01/oradata/deer/system01.dbf (1)
Block: 91761 Offsets: 8183 to 8191 Dba:0x00416671
------------------------------------------------------------------------
62727563 650606b7 c6
<32 bytes="" per="" line="">
------------------------------------------------------------------》列印出8183開始的內容,其中bruce就是要顯示的內容。
BBED> dump /v dba 1,91761 offset 8183 count 32
File: /u01/oradata/deer/system01.dbf (1)
Block: 91761 Offsets: 8183 to 8191 Dba:0x00416671
-------------------------------------------------------
62727563 650606b7 c6 l bruce..·?
<16 bytes="" per="" line="">
---------------------------------------------------------------》破壞資料
BBED> modify 100 dba 1,91671
File: /u01/oradata/deer/system01.dbf (1)
Block: 91671 Offsets: 8183 to 8191 Dba:0x00416617
------------------------------------------------------------------------
644e02c1 020106fa 90
<32 bytes="" per="" line="">
退出
7.用DBV檢查資料資料
[oracle@deer lib]$ dbv file=/u01/oradata/deer/system01.dbf
DBVERIFY: Release 11.2.0.1.0 - Production on Sun Jun 10 12:39:01 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
DBVERIFY - Verification starting : FILE = /u01/oradata/deer/system01.dbf
Page 91671 is marked corrupt
Corrupt block relative dba: 0x00416617 (file 1, block 91671)
Bad check value found during dbv:
Data in bad block:
type: 6 format: 2 rdba: 0x00416617
last change scn: 0x0000.009390fa seq: 0x1 flg: 0x04
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0x90fa0601
check value in block header: 0x276b
computed block checksum: 0x6500
DBVERIFY - Verification complete
Total Pages Examined : 94720
Total Pages Processed (Data) : 65631
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 12887
Total Pages Failing (Index): 0
Total Pages Processed (Other): 3418
Total Pages Processed (Seg) : 1
Total Pages Failing (Seg) : 0
Total Pages Empty : 12783
Total Pages Marked Corrupt : 1
Total Pages Influx : 0
Total Pages Encrypted : 0
Highest block SCN : 11463822 (0.11463822)
檢查一個壞的資料塊。
8.RMAN工具檢查資料檔案
RMAN> backup check logical validate database;
select * from v$database_block_corruption ---顯示結果
SQL> select * from test;
select * from test
*
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 1, block # 91761)
ORA-01110: data file 1: '/u01/oradata/deer/system01.dbf'
Copy $ORA10g_HOME/rdbms/lib/ssbbded.o to $ORA11g_HOME/rdbms/lib
Copy $ORA10g_HOME/rdbms/lib/sbbdpt.o to $ORA11g_HOME/rdbms/lib
Message files (list may differ):
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(這個不一定需要)
[oracle@deer ~]$ cd /u01/oracle/product/11.2.0/dbhome_1/rdbms/lib/
[oracle@deer lib]$ make -f ins_rdbms.mk /u01/oracle/product/11.2.0/dbhome_1/rdbms/lib/bbed
[oracle@deer lib]$ ll bbed
-rwxr-xr-x 1 oracle oinstall 262152 Jun 10 12:14 bbed
2.使用bbed
[oracle@rac10g2 lib]$ ./bbed
Password: --->blockedit
BBED: Release 2.0.0.0.0 - Limited Production on Sun Jun 10 02:58:00 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
************* !!! For Oracle Internal Use only !!! ***************
BBED>
3.create table test( id number(2),name varchar2(20))
insert into test values(10,'bruce')
insert into test values(20,'deer')
select * from test
select rowid,test.* from test
select dbms_rowid.rowid_relative_fno('AAAM8EAABAAAPCCAAA'),
dbms_rowid.rowid_block_number('AAAM8EAABAAAPCCAAA') from dual
select dbms_rowid.rowid_relative_fno('AAAM8EAABAAAPCCAAB'),
dbms_rowid.rowid_block_number('AAAM8EAABAAAPCCAAB') from dual
--查詢file id,block id
4.建立bbed.par檔案
[oracle@deer lib]$ cat bbed.par
blocksize=8192
listfile=bbedlist
mode=edit
-----》其中bbedlist的內容為
[oracle@deer lib]$ cat bbedlist
1 /u01/oradata/deer/system01.dbf 7759462402
2 /u01/oradata/deer/sysaux01.dbf 838860800
5.連線bbed
[oracle@deer lib]$ ./bbed parfile=bbed.par
Password:
BBED: Release 2.0.0.0.0 - Limited Production on Sun Jun 10 12:30:35 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
************* !!! For Oracle Internal Use only !!! ***************
BBED>
BBED> set dba 1,91761
DBA 0x00416671 (4286065 1,91761)
BBED> find /c bruce
File: /u01/oradata/deer/system01.dbf (1)
Block: 91761 Offsets: 8183 to 8191 Dba:0x00416671
------------------------------------------------------------------------
62727563 650606b7 c6
<32 bytes="" per="" line="">
------------------------------------------------------------------》列印出8183開始的內容,其中bruce就是要顯示的內容。
BBED> dump /v dba 1,91761 offset 8183 count 32
File: /u01/oradata/deer/system01.dbf (1)
Block: 91761 Offsets: 8183 to 8191 Dba:0x00416671
-------------------------------------------------------
62727563 650606b7 c6 l bruce..·?
<16 bytes="" per="" line="">
---------------------------------------------------------------》破壞資料
BBED> modify 100 dba 1,91671
File: /u01/oradata/deer/system01.dbf (1)
Block: 91671 Offsets: 8183 to 8191 Dba:0x00416617
------------------------------------------------------------------------
644e02c1 020106fa 90
<32 bytes="" per="" line="">
退出
7.用DBV檢查資料資料
[oracle@deer lib]$ dbv file=/u01/oradata/deer/system01.dbf
DBVERIFY: Release 11.2.0.1.0 - Production on Sun Jun 10 12:39:01 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
DBVERIFY - Verification starting : FILE = /u01/oradata/deer/system01.dbf
Page 91671 is marked corrupt
Corrupt block relative dba: 0x00416617 (file 1, block 91671)
Bad check value found during dbv:
Data in bad block:
type: 6 format: 2 rdba: 0x00416617
last change scn: 0x0000.009390fa seq: 0x1 flg: 0x04
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0x90fa0601
check value in block header: 0x276b
computed block checksum: 0x6500
DBVERIFY - Verification complete
Total Pages Examined : 94720
Total Pages Processed (Data) : 65631
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 12887
Total Pages Failing (Index): 0
Total Pages Processed (Other): 3418
Total Pages Processed (Seg) : 1
Total Pages Failing (Seg) : 0
Total Pages Empty : 12783
Total Pages Marked Corrupt : 1
Total Pages Influx : 0
Total Pages Encrypted : 0
Highest block SCN : 11463822 (0.11463822)
檢查一個壞的資料塊。
8.RMAN工具檢查資料檔案
RMAN> backup check logical validate database;
select * from v$database_block_corruption ---顯示結果
SQL> select * from test;
select * from test
*
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 1, block # 91761)
ORA-01110: data file 1: '/u01/oradata/deer/system01.dbf'
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24237320/viewspace-732379/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【BBED】使用bbed修改數字型別資料型別
- 【BBED】使用bbed修改字元型別資料字元型別
- ORACLE 10g中使用BBED修復損壞資料檔案Oracle 10g
- 【BBED】使用bbed 修改日期型別的資料型別
- 一次使用BBED處理壞塊
- Oracle11g install BbedOracle
- ORACLE11g 不再提供 BBEDOracle
- 是用bbed工具模擬對塊的破壞,並使用rman bock recover進行塊恢復
- 【BBED】使用bbed恢復已經刪除的行資料
- oracle11g的bbed安裝Oracle
- oracle11g 編譯BBED工具Oracle編譯
- oracle11g編譯生成bbedOracle編譯
- 勒索軟體 GermanWiper 破壞資料然後索要贖金
- [20150513]人為破壞資料塊.txt
- 控制檔案被破壞的資料庫恢復方法資料庫
- oracle11g使用bbed執行help命令報錯之系列五Oracle
- 使用BBED幫助理解Oracle資料塊結構Oracle
- 使用bbed完成資料庫的不完全恢復資料庫
- 在遭遇破壞前對企業資料進行安全防護(轉)
- 使用validate驗證資料檢查資料壞塊
- oracle bbed使用Oracle
- bbed_recover:恢復資料塊資料庫資料庫
- bbed 之資料修改Ktbbh(Ktbbh資料)
- 【伺服器資料恢復】AIX系統環境下LV被破壞如何恢復資料?伺服器資料恢復AI
- oracle bbed修改資料塊的例子Oracle
- Oracle_UNDO壞塊測試和修復(BBED)Oracle
- 【BBED】 SYSTEM檔案頭損壞的恢復(4)
- 安全觀點:遭遇資料洩露破壞損失的不只是金錢
- --bbed_recover:恢復資料塊資料庫(mybbed)資料庫
- bbed_recover:恢復資料塊資料庫(續)資料庫
- 《暗黑破壞神2》物品掉落公式公式
- 使用DUMP資料塊與BBED檢視BLOCK對比資料庫修改時的SCNBloC資料庫
- BBED安裝使用
- 【BBED】使用BBED修改資料檔案SCN,使該檔案從offline轉變為online
- 深入解析:段頭塊損壞bbed異常恢復
- OpenWorld18大會:Ellison宣佈資料庫的搜尋和破壞任務資料庫
- 記一次資料庫的優化之隱式轉換的破壞力資料庫優化
- 使用RMAN恢復完全損壞的資料庫資料庫