如何使用bbed(bbed和od配合使用)获取文件id,完成数据文件丢失的修复
su - oracle
cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed
找到对应文件的fd
1.
[root@11g ~]# ps -ef|grep dbw
oracle 3257 1 0 03:57 ? 00:00:00 ora_dbw0_orcl
root 3723 3709 0 06:44 pts/0 00:00:00 grep dbw
2.
[root@11g ~]# lsof -p 3257
...
oracle 3257 oracle 258uW REG 8,3 734011392 789836 /oracle/app/oradata/orcl/system01.dbf
oracle 3257 oracle 259uW REG 8,3 629153792 789839 /oracle/app/oradata/orcl/sysaux01.dbf
oracle 3257 oracle 260uW REG 8,3 209723392 789840 /oracle/app/oradata/orcl/undotbs01.dbf
oracle 3257 oracle 261uW REG 8,3 5251072 789932 /oracle/app/oradata/orcl/users03.dbf
oracle 3257 oracle 262uW REG 8,3 20979712 789841 /oracle/app/oradata/orcl/temp01.dbf
...
3.
[root@11g ~]# cd /proc/3257/fd/258
4.bbed (密码是blockedit)
BBED> set filename '/proc/3257/fd/258'
FILENAME /proc/3257/fd/258
BBED> set blocksize 8192
BLOCKSIZE 8192
BBED> p kcvfh.kcvfhrfn
ub4 kcvfhrfn @368 0x00000001
4.
(od -j <8192+368> -t x1 <258>| head -1)
[root@11g fd]# od -j 8560 -t d2 258| head -1
0020560 1 0 0 0 0 0 0 0
file#
[root@11g fd]# od -j 8560 -t d2 260| head -1
0020560 3 0 0 0 0 0 0 0
file#
网页题目:bbed与od的配合使用恢复被删除的数据文件
本文网址:
http://njwzjz.com/article/jjjhoi.html