一、 bbed安装:
1、ORACLE 11G下安装BBED,需要从ORACLE 10G中复制三个包 sbbdpt.o 、ssbbded.o
并将两个文件移到$ORACLE_HOME/rdbms/lib/ 目录下 , bbedus.msb 移到 $ORACLE_HOME/mesg/ 下面[oracle]$ pwd
/u01/app/oracle/product/11.2.0/db_1/rdbms/libnode1-> ll bbedus.msb-rw-r--r--. 1 oracle oinstall 8704 Mar 5 17:39 bbedus.msbnode1-> ll sbbdpt.o-rw-r--r--. 1 oracle oinstall 1863 Mar 5 17:39 sbbdpt.onode1-> ll ssbbded.o-rw-r--r--. 1 oracle oinstall 1191 Mar 5 17:39 ssbbded.o2、 编译
[oracle]$ make -f $ORACLE_HOME/rdbms/lib/ins_rdbms.mk BBED=$ORACLE_HOME/bin/bbed $ORACLE_HOME/bin/bbedLinking BBED utility (bbed)3、安装成功登陆如下:
[oracle]$ bbedPassword: 默认密码是:blockeditBBED>4、 配置bbed
BBED> set file 1 block 1BBED-00312: no LISTFILE specified > 原因没有配置-- 将sql 查询结果,写入 bbedfile.txt 文件, 并配置 bbed 的 par.bbd
SQL> select file#||' '||name||' '||bytes from v$datafile ;[oracle@12c01 bbed]$ cat bbedfile.txt
1 /home/oracle/app/oracle/oradata/andycdb/system01.dbf 8598323203 /home/oracle/app/oracle/oradata/andycdb/sysaux01.dbf 5767168004 /home/oracle/app/oracle/oradata/andycdb/undotbs01.dbf 629145605 /home/oracle/app/oracle/oradata/andycdb/pdbseed/system01.dbf 2621440006 /home/oracle/app/oracle/oradata/andycdb/pdbseed/sysaux01.dbf 3670016007 /home/oracle/app/oracle/oradata/andycdb/users01.dbf 52428808 /home/oracle/app/oracle/oradata/andycdb/pdbseed/undotbs01.dbf 1048576009 /home/oracle/app/oracle/oradata/andycdb/pdb01/system01.dbf 27262976010 /home/oracle/app/oracle/oradata/andycdb/pdb01/sysaux01.dbf 39845888011 /home/oracle/app/oracle/oradata/andycdb/pdb01/undotbs01.dbf 10485760012 /home/oracle/app/oracle/oradata/andycdb/pdb01/users01.dbf 1703936013 /home/oracle/app/oracle/oradata/andycdb/pdb01/clone01.dbf 104857626 /home/oracle/app/oracle/oradata/andycdb/cdb_users01.dbf 524288027 /home/oracle/app/oracle/oradata/andycdb/pdb01/pdb01_users01.dbf 524288028 /home/oracle/app/oracle/oradata/andycdb/undotbs02 524288029 /home/oracle/app/oracle/oradata/andycdb/pdb01/undotbs02 524288030 /home/oracle/app/oracle/oradata/andycdb/pdb01/undotbs03 5242880[oracle bbed]$ cat par.bbd blocksize=8192listfile=bbedfile.txtmode=edit5、 正式登陆使用
[oracle bbed]$ bbed parfile=par.bbd
BBED> info File# Name Size(blks) ----- ---- ---------- 1 /home/oracle/app/oracle/oradata/andycdb/system01.dbf 104960 3 /home/oracle/app/oracle/oradata/andycdb/sysaux01.dbf 70400...... 省略BBED> set file 31 block 1
FILE# 31 BLOCK# 1 > 成功