【BBED】编译及基本命令(1)

【BBED】编译及基本命令(1)

【BBED】编译及基本命令(1)

一.1  BLOG文档结构图

wps854D.tmp 

 

 

一.2  前言部分

 

一.2.1  导读和注意事项

各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~:

BBED的安装(编译)

② BBED的基本命令

 

  Tips:

       ① 若文章代码格式有错乱,推荐使用搜狗、QQ或360浏览器,也可以下载pdf格式的文档来查看,pdf文档下载地址:http://yunpan.cn/cdEQedhCs2kFz (提取码:ed9b) 

       ② 本篇BLOG中命令的输出部分需要特别关注的地方我都用灰色背景和粉红色字体来表示,比如下边的例子中,thread 1的最大归档日志号为33,thread 2的最大归档日志号为43是需要特别关注的地方;而命令一般使用黄色背景和红色字体标注;对代码或代码输出部分的注释一般采用蓝色字体表示

 

  List of Archived Logs in backup set 11

  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time

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

  1    32      1621589    2015-05-29 11:09:52 1625242    2015-05-29 11:15:48

  1    33      1625242    2015-05-29 11:15:48 1625293    2015-05-29 11:15:58

  2    42      1613951    2015-05-29 10:41:18 1625245    2015-05-29 11:15:49

  2    43      1625245    2015-05-29 11:15:49 1625253    2015-05-29 11:15:53

 

 

 

[ZFXXDB1:root]:/>lsvg -o

T_XDESK_APP1_vg

rootvg

[ZFXXDB1:root]:/>

00:27:22 SQL> alter tablespace idxtbs read write;

 

 

====》2097152*512/1024/1024/1024=1G 

 

 

 

 

 

本文如有错误或不完善的地方请大家多多指正,ITPUB留言或QQ皆可,您的批评指正是我写作的最大动力。

 

 

 

一.2.2  相关参考文章链接

 

完整内容参考David Dai的blog:http://blog.csdn.net/tianlesoftware/article/details/5006580#

 

 

一.3  我的一个编译例子

 

 oracle@ZTGXPADDB1:/oracle$ ls -l  $ORACLE_HOME/rdbms/lib/*sbbd*

-rw-r--r--    1 oracle   dba            1671 May 26 2010  /oracle/app/oracle/product/10.2.0/db/rdbms/lib/sbbdpt.o

-rw-r--r--    1 oracle   dba             900 May 26 2010  /oracle/app/oracle/product/10.2.0/db/rdbms/lib/ssbbded.o

oracle@ZTGXPADDB1:/oracle$ ls -l  $ORACLE_HOME/rdbms/mesg/bbed*

-rw-r--r--    1 oracle   dba            8704 May 27 2010  /oracle/app/oracle/product/10.2.0/db/rdbms/mesg/bbedus.msb

-rw-r--r--    1 oracle   dba           10270 Jul 25 2000  /oracle/app/oracle/product/10.2.0/db/rdbms/mesg/bbedus.msg

oracle@ZTGXPADDB1:/oracle$

 

oracle@ZTGXPADDB1:/oracle$ scp $ORACLE_HOME/rdbms/lib/*sbbd* oracle@22.188.194.64:/oracle/app/oracle/product/11.2.0/db/rdbms/lib/

The authenticity of host '22.188.194.64 (22.188.194.64)' can't be established.

RSA key fingerprint is 17:0d:6f:34:a8:0b:15:20:ca:ab:35:83:58:bb:aa:4f.

Are you sure you want to continue connecting (yes/no)?yes

Warning: Permanently added '22.188.194.64' (RSA) to the list of known hosts.

************************************************************

*                                                          *

*                                                          *

*     ATTENTION:You have logged onto a secured server.     *

*                                                          *

*     All accesses logged!                                 *

*                                                          *

*                                                          *

************************************************************

oracle@22.188.194.64's password:

sbbdpt.o                                                                                                                             100% 1671     1.6KB/s   00:00   

ssbbded.o                                                                                                                            100%  900     0.9KB/s   00:00   

oracle@ZTGXPADDB1:/oracle$  scp $ORACLE_HOME/rdbms/mesg/bbed* oracle@22.188.194.64:/oracle/app/oracle/product/11.2.0/db/rdbms/mesg/

************************************************************

*                                                          *

*                                                          *

*     ATTENTION:You have logged onto a secured server.     *

*                                                          *

*     All accesses logged!                                 *

*                                                          *

*                                                          *

************************************************************

oracle@22.188.194.64's password:

bbedus.msb                                                                                                                           100% 8704     8.5KB/s   00:00   

bbedus.msg                                                                                                                           100%   10KB  10.0KB/s   00:00   

oracle@ZTGXPADDB1:/oracle$

[oracle@ZFFR4CB1101:/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib]$ cd $ORACLE_HOME/rdbms/lib

[oracle@ZFFR4CB1101:/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib]$ make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed

 

Linking BBED utility (bbed)

        rm -f /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/bbed

        ld -b64 -o /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/bbed -L/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/ -L/u01/app/oracle/product/11.2.0/dbhome_1/lib/ /u01/app/oracle/product/11.2.0/dbhome_1/lib/s0main.o /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/ssbbded.o /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/sbbdpt.o -bI:/usr/lib/aio.exp `cat /u01/app/oracle/product/11.2.0/dbhome_1/lib/ldflags`    -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11   -ldbtools11  `cat /u01/app/oracle/product/11.2.0/dbhome_1/lib/ldflags`    -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lnro11 `cat /u01/app/oracle/product/11.2.0/dbhome_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 /u01/app/oracle/product/11.2.0/dbhome_1/lib/ldflags`    -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lnro11 `cat /u01/app/oracle/product/11.2.0/dbhome_1/lib/ldflags`    -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lclient11 -lnnetd11  -lvsn11  -lcommon11 -lgeneric11 -lpls11  -lrt  -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  -lld -lm `cat /u01/app/oracle/product/11.2.0/dbhome_1/lib/sysliblist`  -lm   -lsql11  /u01/app/oracle/product/11.2.0/dbhome_1/lib/nautab.o /u01/app/oracle/product/11.2.0/dbhome_1/lib/naeet.o /u01/app/oracle/product/11.2.0/dbhome_1/lib/naect.o /u01/app/oracle/product/11.2.0/dbhome_1/lib/naedhs.o

ld: 0711-224 WARNING: Duplicate symbol: .aio_nwait_timeout64

ld: 0711-224 WARNING: Duplicate symbol: aio_nwait_timeout64

ld: 0711-224 WARNING: Duplicate symbol: .aio_nwait64

ld: 0711-224 WARNING: Duplicate symbol: aio_nwait64

ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.

ld: 0711-773 WARNING: Object /u01/app/oracle/product/11.2.0/dbhome_1/lib//libgeneric11.a[sdbgrfu.o], imported symbol timezone

        Symbol was expected to be local. Extra instructions

        are being generated to reference the symbol.

[oracle@ZFFR4CB1101:/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib]$

[oracle@ZFFR4CB1101:/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib]$ bbed

Password:

 

BBED: Release 2.0.0.0.0 - Limited Production on Wed Mar 23 11:12:18 2016

 

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

 

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

 

BBED>

 

一.4  我的命令

ls -l  $ORACLE_HOME/rdbms/lib/*sbbd*

ls -l  $ORACLE_HOME/rdbms/mesg/bbed*

chown oracle:dba /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/*sbbd*

chown oracle:dba /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/mesg/bbed*

 

--cd $ORACLE_HOME/rdbms/lib

--make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed

 

--make -f $ORACLE_HOME/rdbms/lib/ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed

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

 

 

 

一.5  总结

 

11g以下可以直接编译使用,11g及以后需要从相应平台的10g中拷贝4个文件到11g相应目录,如下,bbedar.msb可以不用拷贝。然后执行编译命令即可,编译的bbed命令可以直接生成在$ORACLE_HOME/bin下,命令为:make -f $ORACLE_HOME/rdbms/lib/ins_rdbms.mk BBED=$ORACLE_HOME/bin/bbed $ORACLE_HOME/bin/bbed

 

$ORACLE_HOME/rdbms/lib/ssbbded.o

$ORACLE_HOME/rdbms/lib/sbbdpt.o

$ORACLE_HOME/rdbms/mesg/bbedus.msb

$ORACLE_HOME/rdbms/mesg/bbedus.msg

$ORACLE_HOME/rdbms/mesg/bbedar.msb

 

 

------------------------以下是摘自网络内容---------------------------

第二章  BBED 的安装和使用

       The name bbed is an acronym for Block Browser and Editor and it is shipped with thedatabase. It is intended for Oracle internal use only and the company neverpublishes any details about it. It is a very powerful tool but also extremelydangerous since it can change and/or corrupt data blocks of any Oracledatabase.

       Ifyou use this tool, you do so at your own risk. Any modifications made with thistool render the database unsupported by Oracle.

        BBED(Oracle Block Browerand EDitor Tool),用来直接查看和修改数据文件数据的一个工具,是Oracle一款内部工具,可以直接修改Oracle数据文件块的内容,在一些极端恢复场景下比较有用。该工具不受Oracle支持,所以默认是没有生成可执行文件的,在使用前需要重新连接。

     虽然bbed 可以在db open 状态来进行修改,但是建议在做任何修改操作之前先shutdown db。 这样避免checkpoint 进程重写bbed 对block 的修改。 也避免oracle 在bbed 修改完成之前读block 或者申明block 为corrupt

 

二.1  BBED 安装

       Oracle8i 的BBED在windows 平台下的$ORACLE_HOME/bin下可以找到,9i中似乎未随软件发布,故在windows没有这个工具,在linux上面有,需要编译。

二.1.1  9i10g

cd $ORACLE_HOME/rdbms/lib

make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed

wps855D.tmp 

[oracle@redhat4 dul]$ cd $ORACLE_HOME/rdbms/lib

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

 

Linking BBED utility (bbed)

rm -f /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/bbed

gcc -o /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/bbed -L/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/ -L/u01/app/oracle/product/10.2.0/db_1/lib/ -L/u01/app/oracle/product/10.2.0/db_1/lib/stubs/  /u01/app/oracle/product/10.2.0/db_1/lib/s0main.o /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/ssbbded.o /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/sbbdpt.o `cat /u01/app/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/defopt.o -ldbtools10 -lclntsh  `cat /u01/app/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/product/10.2.0/db_1/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/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/product/10.2.0/db_1/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/product/10.2.0/db_1/lib/sysliblist` -Wl,-rpath,/u01/app/oracle/product/10.2.0/db_1/lib -lm    `cat /u01/app/oracle/product/10.2.0/db_1/lib/sysliblist` -ldl -lm   -L/u01/app/oracle/product/10.2.0/db_1/lib

 

然后把这个路径添加到环境变量,注意:aix下为 ~/.profile文件

cd ~

vi .bash_profile 

export PATH=$ORACLE_HOME/bin:$PATH:$ORACLE_HOME/jdk/bin:$ORACLE_HOME/rdbms/lib

wps855E.tmp 

source ~/.bash_profile

oracle@ZTGXPADDB1:/oracle$ .  ~/.profile

oracle@ZTGXPADDB1:/oracle$ bbed

Password:

 

BBED: Release 2.0.0.0.0 - Limited Production on Fri Sep 30 10:42:45 2022

 

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

 

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

 

BBED>

       以上生成的bbed可执行文件在$ORACLE_HOME/rdbms/lib目录,可以复制到其他位置或者其他同Oracle版本的机器上运行。

也可通过以下命令将bbed生成到$ORACLE_HOME/bin目录

[oracle@db2 lib]$ make -f ins_rdbms.mk BBED=$ORACLE_HOME/bin/bbed $ORACLE_HOME/bin/bbed

 

Linking BBED utility (bbed)

rm -f /u01/app/oracle/product/10.2.0/db_1/bin/bbed

gcc -o/u01/app/oracle/product/10.2.0/db_1/bin/bbed-L/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/-L/u01/app/oracle/product/10.2.0/db_1/lib/-L/u01/app/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc  /u01/app/oracle/product/10.2.0/db_1/lib/s0main.o/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/ssbbded.o/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/sbbdpt.o `cat/u01/app/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10-ln10 -lnnz10 -lnl10 /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/defopt.o-ldbtools10 -lclntsh  `cat/u01/app/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10-ln10 -lnnz10 -lnl10 -lnro10 `cat/u01/app/oracle/product/10.2.0/db_1/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/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10-ln10 -lnnz10 -lnl10 -lnro10 `cat/u01/app/oracle/product/10.2.0/db_1/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/product/10.2.0/db_1/lib/sysliblist`-Wl,-rpath,/u01/app/oracle/product/10.2.0/db_1/lib -lm    `cat/u01/app/oracle/product/10.2.0/db_1/lib/sysliblist` -ldl -lm   -L/u01/app/oracle/product/10.2.0/db_1/lib

 

[oracle@db2 lib]$ ls -lrt bbed

-rwxr-xr-x 1 oracle oinstall 536161 Aug 1118:30 bbed

[oracle@db2 lib]$ cd $ORACLE_HOME/bin

[oracle@db2 bin]$ ls -lrt bbed

-rwxr-xr-x 1 oracle oinstall 536161 Aug 11 18:33bbed

 

二.1.2  11g以上

cd $ORACLE_HOME/rdbms/lib

make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed

wps856F.tmp 

[oracle@rhel6_lhr ~]$ cd $ORACLE_HOME/rdbms/lib

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

 

Linking BBED utility (bbed)

rm -f /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/bbed

gcc -o /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/bbed -m64 -L/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/ -L/u01/app/oracle/product/11.2.0/dbhome_1/lib/ -L/u01/app/oracle/product/11.2.0/dbhome_1/lib/stubs/  /u01/app/oracle/product/11.2.0/dbhome_1/lib/s0main.o /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/ssbbded.o /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/sbbdpt.o `cat /u01/app/oracle/product/11.2.0/dbhome_1/lib/ldflags`    -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -ldbtools11 -lclntsh  `cat /u01/app/oracle/product/11.2.0/dbhome_1/lib/ldflags`    -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lnro11 `cat /u01/app/oracle/product/11.2.0/dbhome_1/lib/ldflags`    -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lnnz11 -lzt11 -lztkg11 -lclient11 -lnnetd11  -lvsn11 -lcommon11 -lgeneric11 -lmm -lsnls11 -lnls11  -lcore11 -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lxml11 -lcore11 -lunls11 -lsnls11 -lnls11 -lcore11 -lnls11 `cat /u01/app/oracle/product/11.2.0/dbhome_1/lib/ldflags`    -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lnro11 `cat /u01/app/oracle/product/11.2.0/dbhome_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 /u01/app/oracle/product/11.2.0/dbhome_1/lib/sysliblist` -Wl,-rpath,/u01/app/oracle/product/11.2.0/dbhome_1/lib -lm    `cat /u01/app/oracle/product/11.2.0/dbhome_1/lib/sysliblist` -ldl -lm   -L/u01/app/oracle/product/11.2.0/dbhome_1/lib

gcc: /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/ssbbded.o: No such file or directory

gcc: /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/sbbdpt.o: No such file or directory

make: *** [/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/bbed] Error 1

 

AIX下:

[ZFXDESKDB1:oracle]:/oracle>cd $ORACLE_HOME/rdbms/lib

[ZFXDESKDB1:oracle]:/oracle/app/oracle/product/11.2.0/db/rdbms/lib>make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed

 

Linking BBED utility (bbed)

        rm -f /oracle/app/oracle/product/11.2.0/db/rdbms/lib/bbed

        ld -b64 -o /oracle/app/oracle/product/11.2.0/db/rdbms/lib/bbed -L/oracle/app/oracle/product/11.2.0/db/rdbms/lib/ -L/oracle/app/oracle/product/11.2.0/db/lib/ /oracle/app/oracle/product/11.2.0/db/lib/s0main.o /oracle/app/oracle/product/11.2.0/db/rdbms/lib/ssbbded.o /oracle/app/oracle/product/11.2.0/db/rdbms/lib/sbbdpt.o -bI:/usr/lib/aio.exp `cat /oracle/app/oracle/product/11.2.0/db/lib/ldflags`    -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11   -ldbtools11  `cat /oracle/app/oracle/product/11.2.0/db/lib/ldflags`    -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lnro11 `cat /oracle/app/oracle/product/11.2.0/db/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 /oracle/app/oracle/product/11.2.0/db/lib/ldflags`    -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lnro11 `cat /oracle/app/oracle/product/11.2.0/db/lib/ldflags`    -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lclient11 -lnnetd11  -lvsn11  -lcommon11 -lgeneric11 -lpls11  -lrt  -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  -lld -lm `cat /oracle/app/oracle/product/11.2.0/db/lib/sysliblist`  -lm   -lsql11  /oracle/app/oracle/product/11.2.0/db/lib/nautab.o /oracle/app/oracle/product/11.2.0/db/lib/naeet.o /oracle/app/oracle/product/11.2.0/db/lib/naect.o /oracle/app/oracle/product/11.2.0/db/lib/naedhs.o

ld: 0706-005 Cannot find or open file: /oracle/app/oracle/product/11.2.0/db/rdbms/lib/ssbbded.o

        ld:open(): A file or directory in the path name does not exist.

ld: 0706-005 Cannot find or open file: /oracle/app/oracle/product/11.2.0/db/rdbms/lib/sbbdpt.o

        ld:open(): A file or directory in the path name does not exist.

make: 1254-004 The error code from the last command is 255.

 

 

 

Stop.

 

 

需要10g面考:

sz $ORACLE_HOME/rdbms/lib/ssbbded.o

sz $ORACLE_HOME/rdbms/lib/sbbdpt.o

sz $ORACLE_HOME/rdbms/mesg/bbedus.msb

sz $ORACLE_HOME/rdbms/mesg/bbedus.msg

sz $ORACLE_HOME/rdbms/mesg/bbedar.msb

考出来

wps8570.tmp 

su – oracle

export ORACLE_SID=PROD

pwd

wps8571.tmp 

wps8572.tmp 

administrator下下载窗口一定要在/home/oracle路径下(不能在上面的窗口)。

wps8573.tmp 

wps8584.tmp 

点击添加和确定。

wps8585.tmp 

wps8586.tmp 

cp bbedus.msb $ORACLE_HOME/rdbms/mesg

cp bbedus.msg $ORACLE_HOME/rdbms/mesg

cp *.o $ORACLE_HOME/rdbms/lib

再次执行:

cd $ORACLE_HOME/rdbms/lib

make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed

wps8596.tmp 

搞定

cd /home/oracle

vi .bash_profile

export PATH=$ORACLE_HOME/bin:$PATH:$ORACLE_HOME/jdk/bin:/u01/app/oracle/product/11.2.0/db_1/rdbms/lib

wps8597.tmp 

source /home/oracle/.bash_profile

 

 

 

二.3  使用BBED

       一般使用bbed,都是将一些配置信息写入到一个参数文本里,在调用bbed时,指定该参数文件。如:

       $bbed parfile=bbed.par

bbed help=y

wps8598.tmp 

 

这里我们先演示一个示例。

(1)先获取datafile 的信息

       将datafile 的信息写入一个文件,格式为:文件编号  文件名字 文件大小。可以通过如下SQL   获取:

set line 9999 pagesize 9999

select file#||' '||name||' '||bytes from v$datafile;

wps8599.tmp 

       注意,这里的file id。 我们这里的file id 和 oracle 系统内部的file id 相同。 当然这个id 我们也可以自己指定。 当我们在bbed 里设置file id 时,就是根据这个参数文件中的的设置来的。 最好设置为相同,不然以后可能会混淆。

 

将上面查询出来的datafile信息保存到文本里。

 cd /home/oracle

vi file.txt

1 /u01/app/oracle/oradata/PROD/disk3/system01.dbf 340787200

2 /u01/app/oracle/oradata/PROD/disk4/sysaux01.dbf 340787200

3 /u01/app/oracle/oradata/PROD/disk5/undotbs01.dbf 209715200

4 /u01/app/oracle/oradata/PROD/disk3/users01.dbf 524288000

5 /u01/app/oracle/oradata/PROD/disk3/cuug01.dbf 52428800

wps85AA.tmp 

vi bbed.par

blocksize=8192

listfile=/home/oracle/file.txt

mode=edit

wps85AB.tmp 

source /home/oracle/.bash_profile

bbed parfile=/home/oracle/bbed.par

blockedit

wps85AC.tmp 

BBED是Oracle 内部使用的命令,所以Oracle 不提供技术支持。 为了安全,BBED设置了口令保护,默认密码为blockedit

show

wps85BD.tmp 

如果没有设置参数文件,显示:

wps85BE.tmp 

 

------------------------以上是摘自网络内容---------------------------

 

About Me

 

...........................................................................................................................................................................................

本文作者:小麦苗,只专注于数据库的技术,更注重技术的运用

ITPUB BLOG:http://blog.itpub.net/26736162

本文地址:http://blog.itpub.net/26736162/viewspace-2075216/

本文pdf版:http://yunpan.cn/cdEQedhCs2kFz (提取码:ed9b)

QQ:642808185 若加QQ请注明所正在读的文章标题

2016-04-04 10:00~ 2016-04-04 19:00 在唐镇完成

<版权所有,文章允许转载,但须以链接方式注明源地址,否则追究法律责任!>

...........................................................................................................................................................................................

posted @ 2016-04-04 23:48 ^_^小麦苗^_^ 阅读( ...) 评论( ...) 编辑 收藏
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
提供10g,11g linux及windows BBED工具 及详细编译说明readme文件。 一. 10g linux编译BBED [oracle@node3 ~]$ cd $ORACLE_HOME/rdbms/lib [oracle@node3 lib]$ make -f ins_rdbms.mk BBED=$ORACLE_HOME/bin/bbed $ORACLE_HOME/bin/bbed 直接生成到bin下为可执行文件 编译完成后: 编译成功后登陆BBED,登陆时需要密码(BBED的默认密码是blockedit) [oracle@node3 bin]$ bbed Password: BBED: Release 2.0.0.0.0 - Limited Production on Wed Apr 11 10:01:07 2018 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. ************* !!! For Oracle Internal Use only !!! *************** BBED> 二. 11g linux编译BBED oracle 11gR2环境中编译BBED可执行文件所需要的ssbbded.o和sbbdpt.o对象文件被移除,不过可以从oracle 10g环境中将这两个文件拷贝到oracle11g环境进行编译。 除了将上面的ssbbded.o和sbbdpt.o 文件拷贝到11g环境外,BBED还需要用到 $ORACLE_HOME/rdbms/mesg目录下的bbedus.msb这个信息文件, 这几个文件都需要从oracle10g中拷贝到oracle11g中对于的目录中。 文件夹linux_10g_bbed_64 包括了这3个文件。 下面是将以上3个文件从Oracle 10g中拷贝到11g对于目录后编译的过程。 1)把linux_10g_bbed_64目录下的10g的ssbbded.o和sbbdpt.o 放到 $ORACLE_HOME/rdbms/lib 目录下 2)把linux_10g_bbed_64目录下的10g的 bbedus.msb 文件拷贝到 $ORACLE_HOME/rdbms/mesg目录下 3)编译 [oracle@node1 ~] cd $ORACLE_HOME/rdbms/lib [oracle@node1 ~] make -f ins_rdbms.mk BBED=$ORACLE_HOME/bin/bbed $ORACLE_HOME/bin/bbed [oracle@node3 bin]$ bbed Password: BBED: Release 2.0.0.0.0 - Limited Production on Wed Apr 11 10:01:07 2018 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. ************* !!! For Oracle Internal Use only !!! *************** BBED> 三、windows 11GR2 bbed oracle9i版本以后Oracle不装载BBED了, Windows上也没有makefile来编译bbed。 所以,如果你想在Windows上使用bbed,你需要很多文件(本下载压缩包已经全包含了): 你需要一个bbed.exe. 你只能从Oracle 9i的安装中得到它。 你需要有一堆的DLL。所有这些DLL在Oracle9i安装中可以得到。 使用BBED需要消息文件。这文件是“bbedus.msb”,位于Oracle9i安装的MESG目录下。而你需要将其复制到ORACLE_HOME的RDBMS\MESG目录下。 这些在目录本压缩包的 bbed_win 中已经全部提供了。 把它们放在BBED安装的目录下(比如D:\bbed_win),环境变量ORACLE_HOME设置好。确保消息文件在$ORACLE_HOME\RDBMS\MESG下,最后启动BBED: D:\bbed_win>bbed Password: BBED: Release 2.0.0.0.0 - Limited Production on Wed Apr 11 10:20:43 2018 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. ************* !!! For Oracle Internal Use only !!! *************** BBED>

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小麦苗DBA宝典

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值