2.Oracle BBED解析数据块——准备BBED
欢迎转载,转载请标明出处:http://blog.csdn.net/notbaron/article/details/50551443
BBED工具代码和ORACLE数据库一并安装了。
但是使用到sbbdpt.o和ssbbded.o两个库文件,但是从11g开始,Oracle不再提供这两个库文件。此外还需要一个msb文件。共三个文件,可以从如下链接下载:
http://download.csdn.net/detail/notbaron/9412217
下载后放到/home/oracle/,然后直接解压即可,生成bbed文件夹。
OK,
接着使用BBED需要进行如下操作:
$cd /u01/app/oracle/product/12c/db_1/rdbms/lib
[oracle@OELlib]$ cp /home/oracle/bbed/*.msb ../mesg/
[oracle@OELlib]$ cp /home/oracle/bbed/*.o .
#cp/home/oracle/bb
[oracle@OEL lib]$ make -f ins_rdbms.mk /u01/app/oracle/product/12c/db_1/rdbms/lib/bbed
Linking BBED utility (bbed)
rm -f/u01/app/oracle/product/12c/db_1/rdbms/lib/bbed
/u01/app/oracle/product/12c/db_1/bin/orald-o /u01/app/oracle/product/12c/db_1/rdbms/lib/bbed -m64 -z noexecstack-Wl,--disable-new-dtags -L/u01/app/oracle/product/12c/db_1/rdbms/lib/-L/u01/app/oracle/product/12c/db_1/lib/-L/u01/app/oracle/product/12c/db_1/lib/stubs/ /u01/app/oracle/product/12c/db_1/lib/s0main.o/u01/app/oracle/product/12c/db_1/rdbms/lib/ssbbded.o/u01/app/oracle/product/12c/db_1/rdbms/lib/sbbdpt.o `cat/u01/app/oracle/product/12c/db_1/lib/ldflags` -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -ldbtools12 -lclntsh-lclntshcore `cat/u01/app/oracle/product/12c/db_1/lib/ldflags` -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lnro12 `cat/u01/app/oracle/product/12c/db_1/lib/ldflags` -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lnnz12 -lzt12 -lztkg12-lztkg12 -lclient12 -lnnetd12 -lvsn12-lcommon12 -lgeneric12 -lmm -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12-lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 `cat/u01/app/oracle/product/12c/db_1/lib/ldflags` -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lnro12 `cat/u01/app/oracle/product/12c/db_1/lib/ldflags` -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lclient12 -lnnetd12 -lvsn12 -lcommon12 -lgeneric12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12-lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lclient12-lnnetd12 -lvsn12 -lcommon12 -lgeneric12-lsnls12 -lnls12 -lcore12 -lsnls12-lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12-lcore12 -lnls12 `cat /u01/app/oracle/product/12c/db_1/lib/sysliblist`-Wl,-rpath,/u01/app/oracle/product/12c/db_1/lib -lm `cat/u01/app/oracle/product/12c/db_1/lib/sysliblist` -ldl -lm -L/u01/app/oracle/product/12c/db_1/lib
然后复制到bin下即可。
[oracle@OEL lib]$ cp bbed/u01/app/oracle/product/12c/db_1/bin/
PS:密码默认:blockedit
[oracle@OEL lib]$ bbed
Password:
BBED: Release 2.0.0.0.0 - LimitedProduction on Wed Jan 20 17:52:51 2016
Copyright (c) 1982, 2014, Oracle and/or itsaffiliates. All rights reserved.
************* !!! For Oracle Internal Useonly !!! ***************
BBED> set filename '/oradata/tpcc1.dbf'
FILENAME /oradata/tpcc1.dbf
BBED> show
FILE# 0
BLOCK# 1
OFFSET 0
DBA 0x00000000(0 0,1)
FILENAME /oradata/tpcc1.dbf
BIFILE bifile.bbd
LISTFILE
BLOCKSIZE 8192
MODE Browse
EDIT Unrecoverable
IBASE Dec
OBASE Dec
WIDTH 80
COUNT 512
LOGFILE log.bbd
SPOOL No
Ok,本篇完毕。