oracle 11g中缺bbed包
下载地址:
https://pan.baidu.com/s/19DVvIajarDjnynILNwQDWQ 密码:tmqt
1.BBED的安装
1.上传(sbbdpt.o ssbbded.o bbedus.msb,该三个文件拷贝oracle的linux64版本的)文件
$ORACLE_HOME/rdbms/lib/ssbbded.o $ORACLE_HOME/rdbms/lib/sbbdpt.o $ORACLE_HOME/rdbms/mesg/bbedus.msb
2.编译bbed
cd $ORACLE_HOME/rdbms/lib make -f $ORACLE_HOME/rdbms/lib/ins_rdbms.mk BBED=$ORACLE_HOME/bin/bbed $ORACLE_HOME/bin/bbed
2.进入BBED
[oracle@localhost ~]$ vi par.txt blocksize=8192 listfile=filelist.txt mode=edit [oracle@localhost ~]$ export ORACLE_SID=newtest [oracle@localhost ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Thu Mar 15 21:35:44 2018 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select file#||chr(9)||name||chr(9)||bytes from v$datafile; FILE#||CHR(9)||NAME||CHR(9)||BYTES -------------------------------------------------------------------------------- 1 /home/oracle/app/oradata/newtest/system01.dbf 786432000 2 /home/oracle/app/oradata/newtest/sysaux01.dbf 1006632960 3 /home/oracle/app/oradata/newtest/undotbs01.dbf 78643200 4 /home/oracle/app/oradata/newtest/users01.dbf 355205120 5 /home/oracle/app/oradata/newtest/users02.dbf 524288000 [oracle@localhost ~]$ vi filelist.txt 1 /home/oracle/app/oradata/newtest/system01.dbf 786432000 2 /home/oracle/app/oradata/newtest/sysaux01.dbf 922746880 3 /home/oracle/app/oradata/newtest/undotbs01.dbf 78643200 4 /home/oracle/app/oradata/newtest/users01.dbf 121896960 #修改bash_profile,添加参数等 [oracle@localhost ~]$ vi .bash_profile alias bbed='bbed parfile=par.txt password=blockedit' #进入bbed [oracle@localhost ~]$ bbed BBED: Release 2.0.0.0.0 - Limited Production on Thu Mar 15 22:17:40 2018 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. ************* !!! For Oracle Internal Use only !!! *************** BBED>
3.常用命令
set file 4 block 32
set dba 0x01000020 set offset 0 -- 0 表示第一个字节开始 set block 1 -- 1 表示第一个块开始 set count 8192 -- 默认是显示512字节
find /x 05d67g
#查指定的字符串在指定数据块中的具体位置
f --find的简写,表示继续从当前位置开始往下查询字符串05d67g
dump
#十六进制查看block
dump /v --查看十六进制内容的同时以文本方式“翻译”十六进制显示的内容,相当于对当block执行strings命令
modify /x d43
#修改指定block,指定offset的数据块块内记录的内容
sum apply
#计算修改后的数据块的checksum值,然后写入数据块的offset为16-17的位置