且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

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

更新时间:2022-08-22 16:45:50

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

1.1  BLOG文档结构图

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

 

 

1.2  前言部分

 

1.2.1  导读和注意事项

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

BBED的安装(编译)

② BBED的基本命令

 

  Tips:

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

       ② 本篇BLOG中命令的输出部分需要特别关注的地方我都用灰色背景和粉红色字体来表示,比如下边的例子中,thread 1的最大归档日志号为33thread 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皆可,您的批评指正是我写作的最大动力。

 

 

 

1.2.2  相关参考文章链接

 

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

 

 

1.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>

 

1.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

 

 

 

1.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 BBEDwindows 平台下的$ORACLE_HOME/bin下可以找到,9i中似乎未随软件发布,故在windows没有这个工具,在linux上面有,需要编译。

二.1.1  9i10g

cd $ORACLE_HOME/rdbms/lib

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

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

[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

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

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

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

[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

考出来

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

su – oracle

export ORACLE_SID=PROD

pwd

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

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

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

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

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

点击添加和确定。

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

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

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

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

搞定

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

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

source /home/oracle/.bash_profile

 

 

 

二.3  使用BBED

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

       $bbed parfile=bbed.par

bbed help=y

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

 

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

(1)先获取datafile 的信息

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

set line 9999 pagesize 9999

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

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

       注意,这里的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

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

vi bbed.par

blocksize=8192

listfile=/home/oracle/file.txt

mode=edit

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

source /home/oracle/.bash_profile

bbed parfile=/home/oracle/bbed.par

blockedit

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

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

show

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

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

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

 

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







About Me

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

● 本文作者:小麦苗,部分内容整理自网络,若有侵权请联系小麦苗删除

● 本文在itpub(http://blog.itpub.net/26736162/abstract/1/)、博客园(http://www.cnblogs.com/lhrbest)和个人微信公众号(xiaomaimiaolhr)上有同步更新

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

● 本文博客园地址:http://www.cnblogs.com/lhrbest

● 本文pdf版、个人简介及小麦苗云盘地址:http://blog.itpub.net/26736162/viewspace-1624453/

● 数据库笔试面试题库及解答:http://blog.itpub.net/26736162/viewspace-2134706/

● DBA宝典今日头条号地址:http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826

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

● QQ群号:230161599(满)、618766405

● 微信群:可加我微信,我拉大家进群,非诚勿扰

● 联系我请加QQ好友646634621,注明添加缘由

● 于 2016-04-04 10:00~ 2016-04-04 19:00 在魔都唐镇完成

● 文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解

● 版权所有,欢迎分享本文,转载请保留出处

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

小麦苗的微店https://weidian.com/s/793741433?wfr=c&ifr=shopdetail

小麦苗出版的数据库类丛书http://blog.itpub.net/26736162/viewspace-2142121/

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

使用微信客户端扫描下面的二维码来关注小麦苗的微信公众号(xiaomaimiaolhr)及QQ群(DBA宝典),学习最实用的数据库技术。

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

   小麦苗的微信公众号      小麦苗的DBA宝典QQ群1     小麦苗的DBA宝典QQ群2        小麦苗的微店

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

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