WEB开发网
开发学院数据库Oracle bbed修改数据 阅读

bbed修改数据

 2012-09-05 08:43:35 来源:WEB开发网   
核心提示: 1. 安装10g:[[email protected] ~]$ cd $ORACLE_HOME/rdbms/lib/[[email protected] lib]$ make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed11g:拷贝10g的文件[[email protected] lib]$

 1. 安装
10g:
[[email protected] ~]$ cd $ORACLE_HOME/rdbms/lib/
[[email protected] lib]$ make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed
11g:
拷贝10g的文件
[[email protected] lib]$ mkdir /tmp/libtmp
[[email protected] lib]$ mkdir /tmp/msgtmp
[[email protected] lib]$ cp $ORACLE_HOME/rdbms/lib/ssbbded.o /tmp/libtmp
[[email protected] lib]$ cp $ORACLE_HOME/rdbms/lib/sbbdpt.o /tmp/libtmp
[[email protected] lib]$ ls /tmp/libtmp
sbbdpt.o ssbbded.o
[[email protected] lib]$ cp $ORACLE_HOME/rdbms/mesg/bbed* /tmp/msgtmp
[[email protected] lib]$ ls /tmp/msgtmp
bbedus.msb bbedus.msg
上传到11g服务器上面
cp libtmp/* $ORACLE_HOME/rdbms/lib/
cp msgtmp/* $ORACLE_HOME/rdbms/mesg/
执行make
[[email protected] ~]$ cd $ORACLE_HOME/rdbms/lib
[[email protected] lib]$ make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed
2. 创建flist文件

[email protected]> 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

[[email protected] 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

[email protected]> show parameter db_block_size


NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_block_size                        integer     8192

[[email protected] 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. 下面我们来修改数据
先声明,笔者做实验之前已经有了全集备份,也希望大家在做实验的时候做好备份。以下内容目的只是兴趣。
 

[email protected]> 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

1 2 3  下一页

Tags:bbed 修改 数据

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接