ITPub博客

首页 > Linux操作系统 > Linux操作系统 > bbed修改记录的值(2)

bbed修改记录的值(2)

原创 Linux操作系统 作者:aaqwsh 时间:2011-03-05 21:06:16 0 删除 编辑
通过数据更新的数据不会立即在bbed中看到,需要把更新的值写入文件后才行:
 
SQL> select id,name from MILIATEST;
        ID NAME
---------- --------------------
         1 a2aaaaaaaa
         2 a2aaaaaaaa
         3 a2aaaaaaaa
         6 a4444aabaa
SQL> update MILIATEST set name ='123456789abcdefg' where id=6;
1 row updated.
SQL> commit;
Commit complete.
SQL> select id,name from MILIATEST;
        ID NAME
---------- --------------------
         1 a2aaaaaaaa
         2 a2aaaaaaaa
         3 a2aaaaaaaa
         6 123456789abcdefg
SQL> select dump('123456789abcdefg',16) from dual;
DUMP('123456789ABCDEFG',16)
--------------------------------------------------------------
Typ=96 Len=16: 31,32,33,34,35,36,37,38,39,61,62,63,64,65,66,67
SQL>  select dbms_rowid.rowid_relative_fno(rowid) f,
  2           dbms_rowid.rowid_block_number(rowid) b
  3    from MILIATEST;
         F          B
---------- ----------
         6        156
         6        156
         6        156
         6        156
SQL> alter system checkpoint;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
 
 
 
[oracle@node1 bin]$ bbed parfile=par.txt
Password:
BBED: Release 2.0.0.0.0 - Limited Production on Sat Mar 5 20:59:58 2011
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
************* !!! For Oracle Internal Use only !!! ***************
BBED> set file 6 block 156
        FILE#           6
        BLOCK#          156
BBED> find /x 02c107
 File: /data/ora10g/RACDBSTD/TEST01.DBF (6)
 Block: 156              Offsets: 8100 to 8191           Dba:0x0180009c
------------------------------------------------------------------------
 02c10710 31323334 35363738 39616263 64656667 2c000202 c1070a61 34343434
 61616261 612c0002 02c1040a 61326161 61616161 61612c00 0202c103 0a613261
 61616161 6161612c 000202c1 020a6132 61616161 61616161 0206683d
 <32 bytes per line>
BBED> f   
 File: /data/ora10g/RACDBSTD/TEST01.DBF (6)
 Block: 156              Offsets: 8123 to 8191           Dba:0x0180009c
------------------------------------------------------------------------
 02c1070a 61343434 34616162 61612c00 0202c104 0a613261 61616161 6161612c
 000202c1 030a6132 61616161 61616161 2c000202 c1020a61 32616161 61616161
 61020668 3d
 <32 bytes per line>
BBED> f
BBED-00212: search string not found

BBED> find /x 31323334
BBED-00212: search string not found

BBED> set offset 0
        OFFSET          0
BBED> find /x 31323334
 File: /data/ora10g/RACDBSTD/TEST01.DBF (6)
 Block: 156              Offsets: 8104 to 8191           Dba:0x0180009c
------------------------------------------------------------------------
 31323334 35363738 39616263 64656667 2c000202 c1070a61 34343434 61616261
 612c0002 02c1040a 61326161 61616161 61612c00 0202c103 0a613261 61616161
 6161612c 000202c1 020a6132 61616161 61616161 0206683d
 <32 bytes per line>
BBED> modify /x 38383838
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
 File: /data/ora10g/RACDBSTD/TEST01.DBF (6)
 Block: 156              Offsets: 8104 to 8191           Dba:0x0180009c
------------------------------------------------------------------------
 38383838 35363738 39616263 64656667 2c000202 c1070a61 34343434 61616261
 612c0002 02c1040a 61326161 61616161 61612c00 0202c103 0a613261 61616161
 6161612c 000202c1 020a6132 61616161 61616161 0206683d
 <32 bytes per line>
BBED> sum apply
Check value for File 6, Block 156:
current = 0xaea7, required = 0xaea7
 
 
SQL> startup
ORACLE instance started.
Total System Global Area  167772160 bytes
Fixed Size                  1218316 bytes
Variable Size              62916852 bytes
Database Buffers          100663296 bytes
Redo Buffers                2973696 bytes
Database mounted.
Database opened.
SQL> select id,name from MILIATEST;
        ID NAME
---------- --------------------
         1 a2aaaaaaaa
         2 a2aaaaaaaa
         3 a2aaaaaaaa
         6 888856789abcdefg

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/758322/viewspace-688489/,如需转载,请注明出处,否则将追究法律责任。

上一篇: bbed修改记录的值
请登录后发表评论 登录
全部评论

注册时间:2010-11-24

  • 博文量
    132
  • 访问量
    264895