[20210311]如何建立bbed安装包.txt --//这个跟我的一次经历有关,帮别人恢复一个坏块里数据,对方机器里面没有安装bbed,而且bbed的安装要从10g上拷贝一些文件然后 --//编译,网上有一些链接讲解如何安装编译bbed在11g下。可以参考链接: --//http://blog.itpub.net/267265/viewspace-745588/ => [20121004]11G下编译bbed.txt --//今天尝试在11g做一个安装包,以后直接解压拷贝就可以使用,我仅仅介绍如何制作的方法。 1.环境: SCOTT@book> @ ver1 PORT_STRING VERSION BANNER ------------------------------ -------------- -------------------------------------------------------------------------------- x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production 2.确定需要文件: $ ldd $(which bbed) linux-vdso.so.1 => (0x00007fff0974c000) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ libclntsh.so.11.1 => /u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libclntsh.so.11.1 (0x00007f2b46c6e000) libnnz11.so => /u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libnnz11.so (0x00007f2b468a0000) libdl.so.2 => /lib64/libdl.so.2 (0x0000003799800000) libm.so.6 => /lib64/libm.so.6 (0x00000032cac00000) libpthread.so.0 => /lib64/libpthread.so.0 (0x000000379a000000) libnsl.so.1 => /lib64/libnsl.so.1 (0x000000379c400000) libc.so.6 => /lib64/libc.so.6 (0x0000003799000000) libaio.so.1 => /usr/lib64/libaio.so.1 (0x00007f2b4669d000) /lib64/ld-linux-x86-64.so.2 (0x0000003798c00000) --//注下划线文件找不到,这个很特殊,大家可以网上检索就知道了。 --//实际上只要拷贝/u01下的2个文件。 $ mkdir -p bbedins $ cd bbedins --//拷贝上面看到的文件到该目录包括bbed执行文件。 $ ll total 63440 -rwxr-xr-x 1 oracle oinstall 255300 2021-03-10 17:19:53 bbed -rwxr-xr-x 1 oracle oinstall 144776 2021-03-10 17:22:18 ld-linux-x86-64.so.2 -rwxr-xr-x 1 oracle oinstall 3768 2021-03-10 17:22:12 libaio.so.1 -rwxr-xr-x 1 oracle oinstall 53793394 2021-03-10 17:20:37 libclntsh.so.11.1 -rwxr-xr-x 1 oracle oinstall 1726320 2021-03-10 17:22:06 libc.so.6 -rwxr-xr-x 1 oracle oinstall 23360 2021-03-10 17:21:00 libdl.so.2 -rwxr-xr-x 1 oracle oinstall 614992 2021-03-10 17:21:13 libm.so.6 -rw-r--r-- 1 oracle oinstall 7996693 2021-03-10 17:20:46 libnnz11.so -rwxr-xr-x 1 oracle oinstall 114352 2021-03-10 17:22:00 libnsl.so.1 -rwxr-xr-x 1 oracle oinstall 149968 2021-03-10 17:21:23 libpthread.so.0 3.启动bbed,确定还有那些文件需要: $ ps -ef | grep bbe[d] oracle 18754 18369 0 08:31 pts/2 00:00:00 /usr/local/bin/rlwrap -s 9999 -c -r -i -f /usr/local/share/rlwrap/bbed /u01/app/oracle/product/11.2.0.4/dbhome_1/bin/bbed parfile=bbed.par cmdfile=cmd.par oracle 18755 18754 0 08:31 pts/7 00:00:00 bbed app/oracle/product/11.2.0.4/dbhome_1/bin/bbed parfile=bbed.par cmdfile=cmd.par ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --//进程号 18755. $ ls -l /proc/18755/fd total 0 lrwx------ 1 oracle oinstall 64 2021-03-11 08:31:28 0 -> /dev/pts/7 lrwx------ 1 oracle oinstall 64 2021-03-11 08:31:28 1 -> /dev/pts/7 lrwx------ 1 oracle oinstall 64 2021-03-11 08:31:19 2 -> /dev/pts/7 lr-x------ 1 oracle oinstall 64 2021-03-11 08:31:28 3 -> /u01/app/oracle/product/11.2.0.4/dbhome_1/rdbms/mesg/bbedus.msb lr-x------ 1 oracle oinstall 64 2021-03-11 08:31:28 4 -> /u01/app/oracle/product/11.2.0.4/dbhome_1/oracore/mesg/lrmus.msb lr-x------ 1 oracle oinstall 64 2021-03-11 08:31:28 5 -> /home/oracle/bbed/filelist.txt lrwx------ 1 oracle oinstall 64 2021-03-11 08:31:28 6 -> /mnt/ramdisk/book/system01.dbf l-wx------ 1 oracle oinstall 64 2021-03-11 08:31:28 7 -> /home/oracle/bbed/log.bbd lr-x------ 1 oracle oinstall 64 2021-03-11 08:31:28 8 -> /home/oracle/bbed/cmd.par --//注意/u01目录下几个文件。 $ cd bbedins $ cp /u01/app/oracle/product/11.2.0.4/dbhome_1/rdbms/mesg/bbedus.ms? . $ cp /u01/app/oracle/product/11.2.0.4/dbhome_1/oracore/mesg/lrmus.ms? . --//$ find . -type f -exec ls -l {} \; $ ll total 63468 -rwxr-xr-x 1 oracle oinstall 255300 2021-03-10 17:19:53 bbed -rw-r--r-- 1 oracle oinstall 75 2021-03-11 09:24:38 bbed.par -rw-r--r-- 1 oracle oinstall 8704 2021-03-11 09:24:22 bbedus.msb -rwxr-xr-x 1 oracle oinstall 10299 2021-03-11 09:24:22 bbedus.msg -rw-r--r-- 1 oracle oinstall 27 2021-03-11 08:55:01 cmd.par -rw-r--r-- 1 oracle oinstall 1352 2021-03-11 09:00:23 filelist.txt -rwxr-xr-x 1 oracle oinstall 144776 2021-03-10 17:22:18 ld-linux-x86-64.so.2 -rwxr-xr-x 1 oracle oinstall 3768 2021-03-10 17:22:12 libaio.so.1 -rwxr-xr-x 1 oracle oinstall 53793394 2021-03-10 17:20:37 libclntsh.so.11.1 -rwxr-xr-x 1 oracle oinstall 1726320 2021-03-10 17:22:06 libc.so.6 -rwxr-xr-x 1 oracle oinstall 23360 2021-03-10 17:21:00 libdl.so.2 -rwxr-xr-x 1 oracle oinstall 614992 2021-03-10 17:21:13 libm.so.6 -rw-r--r-- 1 oracle oinstall 7996693 2021-03-10 17:20:46 libnnz11.so -rwxr-xr-x 1 oracle oinstall 114352 2021-03-10 17:22:00 libnsl.so.1 -rwxr-xr-x 1 oracle oinstall 149968 2021-03-10 17:21:23 libpthread.so.0 -rw-r--r-- 1 oracle oinstall 4608 2021-03-11 09:26:20 lrmus.msb -rw-r--r-- 1 oracle oinstall 4433 2021-03-11 09:26:20 lrmus.msg --//使用tar命令打包。 $ cd /home/oracle/ $ tar czf bbedins.tgz bbedins 3.测试: --//拷贝tar包到另外的服务器,解压: # cd /home/oracle # tar xzvf bbedins.tgz bbedins/ bbedins/bbedus.msb bbedins/bbed.par bbedins/bbed bbedins/lrmus.msg bbedins/libnsl.so.1 bbedins/bbedus.msg bbedins/libaio.so.1 bbedins/libm.so.6 bbedins/libclntsh.so.11.1 bbedins/ld-linux-x86-64.so.2 bbedins/libc.so.6 bbedins/libpthread.so.0 bbedins/libnnz11.so bbedins/lrmus.msb bbedins/libdl.so.2 bbedins/filelist.txt bbedins/cmd.par # chown -R oracle:oinstall bbedins --//注好像现在的tar命令做了改进,自动完成,只要你服务器有oracle用户和oinstall组。也就是这步可能可以省略。 --//登录oracle用户测试: $ rlwrap ./bbed parfile=bbed.par cmdfile=cmd.par ./bbed: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/oracle/bbedins $ rlwrap ./bbed parfile=bbed.par cmdfile=cmd.par BBED: Release 2.0.0.0.0 - Limited Production on Thu Mar 11 09:43:49 2021 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. ************* !!! For Oracle Internal Use only !!! *************** BBED> set count 64 COUNT 64 BBED> set width 160 WIDTH 160 BBED> help verify Message 1029 not found; No message file for product=RDBMS, facility=BBED $ cp bbedus.ms? /u01/app/oracle/product/18.0.0/db_home/rdbms/mesg/ $ rlwrap ./bbed parfile=bbed.par cmdfile=cmd.par BBED: Release 2.0.0.0.0 - Limited Production on Thu Mar 11 09:45:11 2021 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. ************* !!! For Oracle Internal Use only !!! *************** BBED> set count 64 COUNT 64 BBED> set width 160 WIDTH 160 BBED> help verify VERIFY [ DBA | FILE | FILENAME | BLOCK ] --//这样基本能正常使用了。 4.补充说明: $ ldd bbed linux-vdso.so.1 => (0x00007ffcde366000) libclntsh.so.11.1 => /home/oracle/bbedins/libclntsh.so.11.1 (0x00007f26fe18b000) libnnz11.so => /home/oracle/bbedins/libnnz11.so (0x00007f26fddbd000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f26fdbb9000) libm.so.6 => /lib64/libm.so.6 (0x00007f26fd8b7000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f26fd69a000) libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f26fd480000) libc.so.6 => /lib64/libc.so.6 (0x00007f26fd0b2000) libaio.so.1 => /lib64/libaio.so.1 (0x00007f26fceaf000) /lib64/ld-linux-x86-64.so.2 (0x000055e8185de000) --//实际上仅仅需要2个oracle的库文件。另外我发现我们一些服务器LD_LIBRARY_PATH环境变量并没有定义。 --//需要自己人为定义例子: $ export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/lib64:/usr/lib64:/usr/local/lib64:/home/oracle/bbedins 5.附上参数文件配置: $ cat cmd.par set count 64 set width 160 $ cat bbed.par blocksize=8192 #listfile=filelist.txt mode=edit PASSWORD=blockedit SPOOL=Y --//listfile那行我注解了。filelist.txt的生成可以执行select file#||' '||name c100 from v$dbfile order by 1;:例子如下: SYS@book> select file#||' '||name c100 from v$dbfile order by 1; C100 ---------------------------------------- 1 /mnt/ramdisk/book/system01.dbf 2 /mnt/ramdisk/book/sysaux01.dbf 3 /mnt/ramdisk/book/undotbs01.dbf 4 /mnt/ramdisk/book/users01.dbf 5 /mnt/ramdisk/book/example01.dbf 6 /mnt/ramdisk/book/tea01.dbf 7 /mnt/ramdisk/book/mssm01.dbf 8 /mnt/ramdisk/book/big.dbf 8 rows selected.
[20210311]如何建立bbed安装包.txt
来源:这里教程网
时间:2026-03-03 16:31:38
作者:
编辑推荐:
- [20210311]如何建立bbed安装包.txt03-03
- [20210312]如何取整月日期.txt03-03
- 需要了解的Data Guard理论知识(一)03-03
- 需要了解的Data Guard理论知识(二)03-03
- 需要了解的Data Guard理论知识(三)03-03
- Oracle监听日志清除03-03
- Oracle 11.2.0.4 Dataguard两则故障处理03-03
- RMAN备份异机恢复03-03
下一篇:
相关推荐
-
雷神推出 MIX PRO II 迷你主机:基于 Ultra 200H,玻璃上盖 + ARGB 灯效
2 月 9 日消息,雷神 (THUNDEROBOT) 现已宣布推出基于英
-
制造商 Musnap 推出彩色墨水屏电纸书 Ocean C:支持手写笔、第三方安卓应用
2 月 10 日消息,制造商 Musnap 现已在海外推出一款 Oce
热文推荐
- Oracle监听日志清除
Oracle监听日志清除
26-03-03 - Oracle 19C RAC open_links_per_instance参数问题
- read by other session 等待事件分析
read by other session 等待事件分析
26-03-03 - Oracle sqlldr工具功能测试
Oracle sqlldr工具功能测试
26-03-03 - SQLServer 2012复制订阅数据订阅过程
SQLServer 2012复制订阅数据订阅过程
26-03-03 - [oracle] 索引低效,导致read by other session等待事件
- 【SQL】SQL表连接方法方式介绍(Oracle/Postgresql)
【SQL】SQL表连接方法方式介绍(Oracle/Postgresql)
26-03-03 - Oracle 19c数据库体系结构-2
Oracle 19c数据库体系结构-2
26-03-03 - 数据库无法注册至监听服务解决办法
数据库无法注册至监听服务解决办法
26-03-03 - Oracle数据库启动过程及状态详解
Oracle数据库启动过程及状态详解
26-03-03
