bbed修改数据
2012-09-05 08:43:35 来源:WEB开发网 1. 安装
10g:
[oracle@styrac1 ~]$ cd $ORACLE_HOME/rdbms/lib/
[oracle@styrac1 lib]$ make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed
11g:
拷贝10g的文件
[oracle@styrac2 lib]$ mkdir /tmp/libtmp
[oracle@styrac2 lib]$ mkdir /tmp/msgtmp
[oracle@styrac2 lib]$ cp $ORACLE_HOME/rdbms/lib/ssbbded.o /tmp/libtmp
[oracle@styrac2 lib]$ cp $ORACLE_HOME/rdbms/lib/sbbdpt.o /tmp/libtmp
[oracle@styrac2 lib]$ ls /tmp/libtmp
sbbdpt.o ssbbded.o
[oracle@styrac2 lib]$ cp $ORACLE_HOME/rdbms/mesg/bbed* /tmp/msgtmp
[oracle@styrac2 lib]$ ls /tmp/msgtmp
bbedus.msb bbedus.msg
上传到11g服务器上面
cp libtmp/* $ORACLE_HOME/rdbms/lib/
cp msgtmp/* $ORACLE_HOME/rdbms/mesg/
执行make
[oracle@james-test ~]$ cd $ORACLE_HOME/rdbms/lib
[oracle@james-test lib]$ make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed
2. 创建flist文件
sys@FAKE> select file#||' '||name||' '||bytes as flist from v$datafile ; FLIST ---------------------------------------------------------------------- 1 /u01/apps/oracle/oradata/fake/system01.dbf 744488960 2 /u01/apps/oracle/oradata/fake/sysaux01.dbf 703922176 3 /u01/apps/oracle/oradata/fake/undotbs01.dbf 325058560 4 /u01/apps/oracle/oradata/fake/users01.dbf 16777216 5 /u01/apps/oracle/oradata/fake/example01.dbf 104857600
[oracle@oel bbed]$ cat flist.txt
1 /u01/apps/oracle/oradata/fake/system01.dbf 744488960
2 /u01/apps/oracle/oradata/fake/sysaux01.dbf 703922176
3 /u01/apps/oracle/oradata/fake/undotbs01.dbf 325058560
4 /u01/apps/oracle/oradata/fake/users01.dbf 16777216
5 /u01/apps/oracle/oradata/fake/example01.dbf 104857600
sys@FAKE> show parameter db_block_size NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_block_size integer 8192
[oracle@oel bbed]$ cat dex.par
blocksize=8192
listfile=/home/oracle/bbed/flist.txt
mode=broswer
方便一下放进环境变量里面
alias bbed='rlwrap bbed parfile=/home/oracle/bbed/dex.par'
4. 下面我们来修改数据
先声明,笔者做实验之前已经有了全集备份,也希望大家在做实验的时候做好备份。以下内容目的只是兴趣。
sys@FAKE> select t.*, 2 dbms_rowid.rowid_relative_fno(t.rowid) as "FNO#", 3 dbms_rowid.rowid_block_number(t.rowid) as "BLK#", 4 dbms_rowid.rowid_row_number(t.rowid) as "ROW#" 5 from scott.emp t 6 where t.empno = 7839; EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO FNO# BLK# ROW# ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- ---------- ---------- ---------- 7839 KING PRESIDENT 17-NOV-81 5000 10 4 29 8
更多精彩
赞助商链接