有人在Google新聞組上提出了一個問題:How can I get the BBED password?
後來Pete Finnigan也在他的Blog寫了一篇文章
在討論中
BBED是Block Browser/Editor的縮寫
BBED隨軟件發布
雖然BBED工具的使用存在很多風險
本文簡單介紹一下如何用BBED模擬壞塊
[oracle@jumper conner]$ sqlplus
SQL*Plus: Release
Copyright (c)
Connected to:
Oracle
With the Partitioning option
JServer Release
SQL> create table bbed tablespace users as select * from dba_tables;
Table created
SQL> select count(*) from bbed;
COUNT(*)
SQL> col segment_name for a
SQL> select segment_name
SEGMENT_NA FILE_ID BLOCK_ID
BBED
BBED
BBED
SQL> select count(*) from bbed;
COUNT(*)
[oracle@jumper conner]$ more filelist
[oracle@jumper conner]$ more par
blocksize=
listfile=filelist
mode=edit
[oracle@jumper conner]$ bbed parfile=par
Password:
BBED: Release
Copyright (c)
************* !!! For Oracle Internal Use only !!! ***************
BBED> set file
FILE#
BBED> show
FILE#
BLOCK#
OFFSET
DBA
FILENAME /opt/oracle/oradata/conner/users
BIFILE bifile
LISTFILE filelist
BLOCKSIZE
MODE Edit
EDIT Unrecoverable
IBASE Dec
OBASE Dec
WIDTH
COUNT
LOGFILE log
SPOOL No
如果操作中發生誤操作
BBED> modify /x
File: /opt/oracle/oradata/conner/users
Block:
<
BBED> revert
All changes made in this session will be rolled back
Reverted file
Warning: contents of previous BIFILE will be lost
模擬壞塊
BBED> modify
File: /opt/oracle/oradata/conner/users
Block:
c
ffffffff
ffffff
<
使用verify命令
BBED> verify
DBVERIFY
FILE = /opt/oracle/oradata/conner/users
BLOCK =
Block
***
Corrupt block relative dba:
Bad check value found during verification
Data in bad block
type:
last change scn:
consistency value in tail:
check value in block header:
spare
***
DBVERIFY
Total Blocks Examined :
Total Blocks Processed (Data) :
Total Blocks Failing (Data) :
Total Blocks Processed (Index):
Total Blocks Failing (Index):
Total Blocks Empty :
Total Blocks Marked Corrupt :
Total Blocks Influx :
BBED> quit
[oracle@jumper conner]$ dbv file=users
DBVERIFY: Release
Copyright (c)
DBVERIFY
Page
***
Corrupt block relative dba:
Bad check value found during dbv:
Data in bad block
type:
last change scn:
consistency value in tail:
check value in block header:
spare
***
DBVERIFY
Total Pages Examined :
Total Pages Processed (Data) :
Total Pages Failing (Data) :
Total Pages Processed (Index):
Total Pages Failing (Index):
Total Pages Processed (Other):
Total Pages Processed (Seg) :
Total Pages Failing (Seg) :
Total Pages Empty :
Total Pages Marked Corrupt :
Total Pages Influx :
重新啟動數據庫以後
SQL>
ORACLE instance
Total System Global Area
Fixed Size
Variable Size
Database Buffers
Redo Buffers
Database mounted
Database opened
SQL> select count(*) from bbed;
select count(*) from bbed
*
ERROR at line
ORA
ORA
SQL>
以上方法僅供測試使用
From:http://tw.wingwit.com/Article/program/Oracle/201311/18727.html