点击(此处)折叠或打开
-
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Prod
PL/SQL Release 10.2.0.5.0 - Production
CORE 10.2.0.5.0 Production
TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
-
[root@yws ~]# su - oracle
-
[oracle@yws ~]$ cd $ORACLE_HOME/rdbms/lib
-
[oracle@yws lib]$ make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed --编译 bbed tool
-
Linking BBED utility (bbed)
-
rm -f /u01/oracle/product/10.2.0/rdbms/lib/bbed
-
gcc -o /u01/oracle/product/10.2.0/rdbms/lib/bbed -L/u01/oracle/product/10.2.0/rdbms/lib/ -L/u01/oracle/product/10.2.0/lib/ -L/u01/oracle/product/10.2.0/lib/stubs/ -L/usr/lib -lirc /u01/oracle/product/10.2.0/lib/s0main.o /u01/oracle/product/10.2.0/rdbms/lib/ssbbded.o /u01/oracle/product/10.2.0/rdbms/lib/sbbdpt.o `cat /u01/oracle/product/10.2.0/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 /u01/oracle/product/10.2.0/rdbms/lib/defopt.o -ldbtools10 -lclntsh `cat /u01/oracle/product/10.2.0/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/oracle/product/10.2.0/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/oracle/product/10.2.0/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/oracle/product/10.2.0/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/oracle/product/10.2.0/lib/sysliblist` -Wl,-rpath,/u01/oracle/product/10.2.0/lib -lm `cat /u01/oracle/product/10.2.0/lib/sysliblist` -ldl -lm -L/u01/oracle/product/10.2.0/lib
-
[oracle@yws lib]$ ln -s $ORACLE_HOME/rdbms/lib/bbed $ORACLE_HOME/bin/bbed --创建软连接
-
[oracle@yws lib]$ vi /home/oracle/bbed.par --编译bbed配置文件
-
[oracle@yws lib]$ cat /home/oracle/bbed.par
-
blocksize=8192 --标准块大小
-
listfile=/home/oracle/filelist.txt --文件列表
-
logfile=log.bbed --log
-
[oracle@yws lib]$ sqlplus / as sysdba
-
-
SQL*Plus: Release 10.2.0.5.0 - Production on Fri Dec 20 18:55:35 2013
-
-
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
-
-
-
Connected to:
-
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
-
With the Partitioning, OLAP, Data Mining and Real Application Testing options
-
-
SQL> spool /home/oracle/filelist.txt --创建filelist
-
SQL> select file_id||' '||file_name||' '||bytes from dba_data_files; --filelist格式
-
-
FILE_ID||''||FILE_NAME||''||BYTES
-
--------------------------------------------------------------------------------
-
4 /u01/oracle/oradata/yws/users01.dbf 5242880
-
3 /u01/oracle/oradata/yws/sysaux01.dbf 262144000
-
2 /u01/oracle/oradata/yws/undotbs01.dbf 534773760
-
1 /u01/oracle/oradata/yws/system01.dbf 534773760
- 5 /u01/oracle/oradata/yws/example01.dbf 104857600
点击(此处)折叠或打开
-
[oracle@yws ~]$ bbed parfile=bbed.par --启动
-
Password: --password:blockedit
-
-
BBED: Release 2.0.0.0.0 - Limited Production on Fri Dec 20 18:57:38 2013
-
-
Copyright (c) 1982, 2007, Oracle. All rights reserved.
-
-
************* !!! For Oracle Internal Use only !!! ***************
-
-
BBED> show all
-
FILE# 1
-
BLOCK# 1
-
OFFSET 0
-
DBA 0x00400001 (4194305 1,1)
-
FILENAME /u01/oracle/oradata/yws/system01.dbf
-
BIFILE bifile.bbd
-
LISTFILE /home/oracle/filelist.txt
-
BLOCKSIZE 8192
-
MODE Browse
-
EDIT Unrecoverable
-
IBASE Dec
-
OBASE Dec
-
WIDTH 80
-
COUNT 512
-
LOGFILE log.bbed
-
SPOOL No
-
-
BBED> info --成功安装
-
File# Name Size(blks)
-
----- ---- ----------
-
1 /u01/oracle/oradata/yws/system01.dbf 65280
-
2 /u01/oracle/oradata/yws/undotbs01.dbf 65280
-
3 /u01/oracle/oradata/yws/sysaux01.dbf 32000
-
4 /u01/oracle/oradata/yws/users01.dbf 640
-
5 /u01/oracle/oradata/yws/example01.dbf 12800
-
- BBED> exit