安装bbed
10g:
cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed
cp bbed $ORACLE_HOME/bin
11g:
需要复制10g中的ssbbded.o、sbbdpt.o、bbedus.ms*文件到11g相应目录,然后编译
cp /s01/10gdb/rdbms/lib/ssbbded.o /s01/11gdb/rdbms/lib
cp /s01/10gdb/rdbms/lib/sbbdpt.o /s01/11gdb/rdbms/lib
cp /s01/10gdb/rdbms/mesg/bbedus.ms* /s01/11gdb/rdbms/mesg/
/* bbed 需要用到bbedus.msg和bbedus.msb 2个信息文件 */
make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed
cp bbed $ORACLE_HOME/bin
使用bbed
设置bbed.par, filelist.txt文件
bbed.par(bbed的参数文件):
blocksize=8192
listfile=/home/oracle/filelist.txt
mode=edit
filelist.txt(文件列表):
1 /u01/app/oracle/fast_recovery_area/orcl/control02.ctl 9748480
打开bbed
[oracle@bogon ~]$ bbed parfile=bbed.par
Password: (密码是blockedit)
BBED: Release 2.0.0.0.0 - Limited Production on Tue May 6 14:34:19 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
************* !!! For Oracle Internal Use only !!! ***************
3. 常用命令
BBED> info
File# Name Size(blks)
----- ---- ----------
1 /u01/app/oracle/fast_recovery_area/orcl/control02.ctl 1190
BBED> show
FILE# 1
BLOCK# 1
OFFSET 0
DBA 0x00400001 (4194305 1,1)
FILENAME /u01/app/oracle/fast_recovery_area/orcl/control02.ctl
BIFILE bifile.bbd
LISTFILE /home/oracle/filelist.txt
BLOCKSIZE 16384
MODE Edit
EDIT Unrecoverable
IBASE Dec
OBASE Dec
WIDTH 80
COUNT 512
LOGFILE log.bbd
SPOOL No