Oracle 10g/11g编译上古神器BBED

日期: 2010-06-27 来源:TechTarget中国

  BBED(Oracle Block Brower and EDitor Tool),用来直接查看和修改数据文件数据的一个工具,是Oracle一款内部工具,可以直接修改Oracle数据文件块的内容,简单来说就是一个针对Oracle的二进制编辑工具。该工具不受Oracle支持,所以默认是没有生成可执行文件的,在使用前需要重新编译。

  在Oracle 10g中编译BBED

  01[oracle@mailserver ~]$ cd $ORACLE_HOME/rdbms/lib
  02[oracle@mailserver lib]$ make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed
  03
  04Linking BBED utility (bbed)
  05rm -f /u01/app/oracle/rdbms/lib/bbed
  06gcc -o /u01/app/oracle/rdbms/lib/bbed -L/u01/app/oracle/rdbms/lib/ -L/u01/app/oracle/lib/ -L/u01/app/oracle/lib/stubs/ /u01/app/oracle/lib/s0main.o /u01/app/oracle/rdbms/lib/ssbbded.o /u01/app/oracle/rdbms/lib/sbbdpt.o `cat /u01/app/oracle/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 /u01/app/oracle/rdbms/lib/defopt.o -ldbtools10 -lclntsh `cat /u01/app/oracle/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lmm -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /u01/app/oracle/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /u01/app/oracle/lib/sysliblist` -Wl,-rpath,/u01/app/oracle/lib -lm `cat /u01/app/oracle/lib/sysliblist` -ldl -lm -L/u01/app/oracle/lib
  07[oracle@mailserver lib]$ ls bbed
  08bbed
  09[oracle@mailserver lib]$ link ./bbed $ORACLE_HOME/bin/bbed
  10[oracle@mailserver lib]$ bbed
  11Password:
  12
  13BBED: Release 2.0.0.0.0 – Limited Production on Fri Jun 25 11:24:54 2010
  14
  15Copyright (c) 1982, 2005, Oracle. All rights reserved.
  16
  17************* !!! For Oracle Internal Use only !!! ***************
  18
  19BBED> exit

  在Oracle 11g中编译BBED

  Oracle 11g编译BBED就麻烦一点,将Oracle 10g的ORACLE_HOME目录中的5个文件复制到Oracle 11g对应的目录中。

  01[oracle@mailserver ~]$ mkdir -p /tmp/bbed/lib/
  02[oracle@mailserver ~]$ mkdir -p /tmp/bbed/mesg/
  03[oracle@mailserver ~]$ cd $ORACLE_HOME
  04[oracle@mailserver oracle]$ cp ./rdbms/lib/ssbbded.o /tmp/bbed/lib/
  05[oracle@mailserver oracle]$ cp ./rdbms/lib/sbbdpt.o /tmp/bbed/lib/
  06[oracle@mailserver oracle]$ cp ./rdbms/mesg/bbed
  07bbedus.msb bbedus.msg bbedzhs.msb
  08[oracle@mailserver oracle]$ cp ./rdbms/mesg/bbed* /tmp/bbed/mesg/
  09
  10[ora11g@mailserver ~]$ cd $ORACLE_HOME
  11[ora11g@mailserver db_1]$ cp /tmp/bbed/lib/* ./rdbms/lib/
  12[ora11g@mailserver db_1]$ cp /tmp/bbed/mesg/* ./rdbms/mesg/

  此时再进行编译:

  [ora11g@mailserver ~]$ cd $ORACLE_HOME
  [ora11g@mailserver db_1]$ make -f ./rdbms/lib/ins_rdbms.mk BBED=./bin/bbed ./bin/bbed
  Linking BBED utility (bbed)
  rm -f bin/bbed
  gcc -o bin/bbed -m64 -L/u11/app/oracle/11.2/db_1/rdbms/lib/ -L/u11/app/oracle/11.2/db_1/lib/ -L/u11/app/oracle/11.2/db_1/lib/stubs/ /u11/app/oracle/11.2/db_1/lib/s0main.o /u11/app/oracle/11.2/db_1/rdbms/lib/ssbbded.o /u11/app/oracle/11.2/db_1/rdbms/lib/sbbdpt.o `cat /u11/app/oracle/11.2/db_1/lib/ldflags` -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -ldbtools11 -lclntsh `cat /u11/app/oracle/11.2/db_1/lib/ldflags` -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lnro11 `cat /u11/app/oracle/11.2/db_1/lib/ldflags` -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lnnz11 -lzt11 -lztkg11 -lztkg11 -lclient11 -lnnetd11 -lvsn11 -lcommon11 -lgeneric11 -lmm -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lxml11 -lcore11 -lunls11 -lsnls11 -lnls11 -lcore11 -lnls11 `cat /u11/app/oracle/11.2/db_1/lib/ldflags` -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lnro11 `cat /u11/app/oracle/11.2/db_1/lib/ldflags` -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lclient11 -lnnetd11 -lvsn11 -lcommon11 -lgeneric11 -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lxml11 -lcore11 -lunls11 -lsnls11 -lnls11 -lcore11 -lnls11 -lclient11 -lnnetd11 -lvsn11 -lcommon11 -lgeneric11 -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lxml11 -lcore11 -lunls11 -lsnls11 -lnls11 -lcore11 -lnls11 `cat /u11/app/oracle/11.2/db_1/lib/sysliblist` -Wl,-rpath,/u11/app/oracle/11.2/db_1/lib -lm `cat /u11/app/oracle/11.2/db_1/lib/sysliblist` -ldl -lm -L/u11/app/oracle/11.2/db_1/lib
  [ora11g@mailserver db_1]$ bbed
  Password:
  
  BBED: Release 2.0.0.0.0 – Limited Production on Fri Jun 25 11:44:05 2010
  
  Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
  ************* !!! For Oracle Internal Use only !!! ***************
   BBED> exit

我们一直都在努力坚持原创.......请不要一声不吭,就悄悄拿走。

我原创,你原创,我们的内容世界才会更加精彩!

【所有原创内容版权均属TechTarget,欢迎大家转发分享。但未经授权,严禁任何媒体(平面媒体、网络媒体、自媒体等)以及微信公众号复制、转载、摘编或以其他方式进行使用。】

微信公众号

TechTarget微信公众号二维码

TechTarget

官方微博

TechTarget中国官方微博二维码

TechTarget中国

电子邮件地址不会被公开。 必填项已用*标注

敬请读者发表评论,本站保留删除与本文无关和不雅评论的权力。

相关推荐