首次使用bbed前必须要经过链接编译。编译方法如下:
[oraten@yue lib]$ make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed Linking BBED utility (bbed) rm -f /home/app/oraten/product/10.2.0/db_1/rdbms/lib/bbed gcc -o /home/app/oraten/product/10.2.0/db_1/rdbms/lib/bbed -L/home/app/oraten/product/10.2.0/db_1/rdbms/lib/ -L/home/app/oraten/product/10.2.0/db_1/lib/ -L/home/app/oraten/product/10.2.0/db_1/lib/stubs/ /home/app/oraten/product/10.2.0/db_1/lib/s0main.o /home/app/oraten/product/10.2.0/db_1/rdbms/lib/ssbbded.o /home/app/oraten/product/10.2.0/db_1/rdbms/lib/sbbdpt.o `cat /home/app/oraten/product/10.2.0/db_1/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 /home/app/oraten/product/10.2.0/db_1/rdbms/lib/defopt.o -ldbtools10 -lclntsh `cat /home/app/oraten/product/10.2.0/db_1/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/app/oraten/product/10.2.0/db_1/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lmm -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /home/app/oraten/product/10.2.0/db_1/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /home/app/oraten/product/10.2.0/db_1/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /home/app/oraten/product/10.2.0/db_1/lib/sysliblist` -Wl,-rpath,/home/app/oraten/product/10.2.0/db_1/lib -lm `cat /home/app/oraten/product/10.2.0/db_1/lib/sysliblist` -ldl -lm -L/home/app/oraten/product/10.2.0/db_1/lib [oraten@yue lib]$ ll -rwxr-xr-x 1 oraten dba 706118 9月 30 21:37 bbed
[oraten@yue bin]$ ./bbed help=yes PASSWORD - Required parameter FILENAME - Database file name BLOCKSIZE - Database block size LISTFILE - List file name MODE - [browse/edit] SPOOL - Spool to logfile [no/yes] CMDFILE - BBED command file name LOGFILE - BBED log file name PARFILE - Parameter file name BIFILE - BBED before-image file name REVERT - Rollback changes from BIFILE [no/yes] SILENT - Hide banner [no/yes] HELP - Show all valid parameters [no/yes]
Listfile=/home/oracle/bbed/fileunix.log [oracle@jode bbed] cat fileunix.log 1 /home/oracle/oradata/oraten/user01.dbf 216214400 2 /home/oracle/oradata/oraten/system01.dbf 335544320
BBED: Release 2.0.0.0.0 - Limited Production on 星期三 10月 1 20:20:09 2014 Copyright (c) 1982, 2007, Oracle. All rights reserved. ************* !!! For Oracle Internal Use only !!! *************** BBED> help all SET DBA [ dba | file#, block# ] SET FILENAME 'filename' SET FILE file# SET BLOCK [+/-]block# SET OFFSET [ [+/-]byte offset | symbol | *symbol ] SET BLOCKSIZE bytes SET LIST[FILE] 'filename' SET WIDTH character_count SET COUNT bytes_to_display SET IBASE [ HEX | OCT | DEC ] SET OBASE [ HEX | OCT | DEC ] SET MODE [ BROWSE | EDIT ] SET SPOOL [ Y | N ] SHOW [ <SET parameter> | ALL ] INFO MAP[/v] [ DBA | FILENAME | FILE | BLOCK ] DUMP[/v] [ DBA | FILENAME | FILE | BLOCK | OFFSET | COUNT ] PRINT[/x|d|u|o|c] [ DBA | FILE | FILENAME | BLOCK | OFFSET | symbol | *symbol ] EXAMINE[/Nuf] [ DBA | FILE | FILENAME | BLOCK | OFFSET | symbol | *symbol ] </Nuf>: N - a number which specifies a repeat count. u - a letter which specifies a unit size: b - b1, ub1 (byte) h - b2, ub2 (half-word) w - b4, ub4(word) r - Oracle table/index row f - a letter which specifies a display format: x - hexadecimal d - decimal u - unsigned decimal o - octal c - character (native) n - Oracle number t - Oracle date i - Oracle rowid FIND[/x|d|u|o|c] numeric/character string [ TOP | CURR ] COPY [ DBA | FILE | FILENAME | BLOCK ] TO [ DBA | FILE | FILENAME | BLOCK ] MODIFY[/x|d|u|o|c] numeric/character string [ DBA | FILE | FILENAME | BLOCK | OFFSET | symbol | *symbol ] ASSIGN[/x|d|u|o] <target spec>=<source spec> <target spec> : [ DBA | FILE | FILENAME | BLOCK | OFFSET | symbol | *symbol ] <source spec> : [ value | <target spec options> ] SUM [ DBA | FILE | FILENAME | BLOCK ] [ APPLY ] PUSH [ DBA | FILE | FILENAME | BLOCK | OFFSET ] POP [ALL] REVERT [ DBA | FILE | FILENAME | BLOCK ] UNDO HELP [ <bbed command> | ALL ] VERIFY [ DBA | FILE | FILENAME | BLOCK ] CORRUPT [ DBA | FILE | FILENAME | BLOCK ]
用来设置需要查看和编辑的数据块,该命令有两种使用方法,一种是直接指定数据块的dba,另一中是指定file#( listfile中的文件号)和block#。
BBED> set dba 5,1 DBA 0x01400001 (20971521 5,1) BBED> find /c TBS3 File: /home/app/oraten/oradata/oraten/tbs301.dbf (5) Block: 1 Offsets: 338 to 849 Dba:0x01400001 ------------------------------------------------------------------------ 54425333 00000000 00000000 00000000 00000000 00000000 00000000 00000500 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00001bd5 3c33a9ec 05000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000a82a 0b000000 00008e05 4c330100 00001300 0000fd00 00001000 00000200 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000d00 0d000d00 01000000 00000000 00000000 00000200 40010000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 <32 bytes per line> BBED> set dba 0x01400001 DBA 0x01400001 (20971521 5,1) BBED> find /c TBS3 File: /home/app/oraten/oradata/oraten/tbs301.dbf (5) Block: 1 Offsets: 338 to 849 Dba:0x01400001 ------------------------------------------------------------------------ 54425333 00000000 00000000 00000000 00000000 00000000 00000000 00000500 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00001bd5 3c33a9ec 05000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000a82a 0b000000 00008e05 4c330100 00001300 0000fd00 00001000 00000200 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000d00 0d000d00 01000000 00000000 00000000 00000200 40010000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 <32 bytes per line>
BBED> p kcvfhhdr struct kcvfhhdr, 76 bytes @20 ub4 kccfhswv @20 0x00000000 ub4 kccfhcvn @24 0x0a200500 ub4 kccfhdbi @28 0xda0e3a18 text kccfhdbn[0] @32 O text kccfhdbn[1] @33 R text kccfhdbn[2] @34 A text kccfhdbn[3] @35 T text kccfhdbn[4] @36 E text kccfhdbn[5] @37 N text kccfhdbn[6] @38 text kccfhdbn[7] @39 ub4 kccfhcsq @40 0x000006f3 ub4 kccfhfsz @44 0x00000500 s_blkz kccfhbsz @48 0x00 ub2 kccfhfno @52 0x0005 ub2 kccfhtyp @54 0x0003 ub4 kccfhacid @56 0x00000000 ub4 kccfhcks @60 0x00000000 text kccfhtag[0] @64 text kccfhtag[1] @65 text kccfhtag[2] @66 text kccfhtag[3] @67 text kccfhtag[4] @68 text kccfhtag[5] @69 text kccfhtag[6] @70 text kccfhtag[7] @71 text kccfhtag[8] @72 text kccfhtag[9] @73 text kccfhtag[10] @74 text kccfhtag[11] @75 text kccfhtag[12] @76 text kccfhtag[13] @77 text kccfhtag[14] @78 text kccfhtag[15] @79 text kccfhtag[16] @80 text kccfhtag[17] @81 text kccfhtag[18] @82 text kccfhtag[19] @83 text kccfhtag[20] @84 text kccfhtag[21] @85 text kccfhtag[22] @86 text kccfhtag[23] @87 text kccfhtag[24] @88 text kccfhtag[25] @89 text kccfhtag[26] @90 text kccfhtag[27] @91 text kccfhtag[28] @92 text kccfhtag[29] @93 text kccfhtag[30] @94 text kccfhtag[31] @95
Set file name
BBED> set filename '/home/app/oraten/oradata/oraten/tbs101.dbf' FILENAME /home/app/oraten/oradata/oraten/tbs101.dbf
Set width
BBED> set width 120 WIDTH 120
Set ibase
BBED> set ibase hex IBASE Hex BBED> set block B BLOCK# 11 BBED> show block BLOCK# 11
Set obase
BBED> set block 11 BLOCK# 0x0000000b BBED> set obase dec OBASE Dec BBED> set block 11 BLOCK# 11
BBED> map File: /home/app/oraten/oradata/oraten/tbs101.dbf (5) Block: 20 Dba:0x01400014 ------------------------------------------------------------ KTB Data Block (Table/Cluster) struct kcbh, 20 bytes @0 struct ktbbh, 72 bytes @20 struct kdbh, 14 bytes @100 struct kdbt[1], 4 bytes @114 sb2 kdbr[2] @118 ub1 freespace[8040] @122 ub1 rowdata[26] @8162 ub4 tailchk @8188 BBED> map /v File: /home/app/oraten/oradata/oraten/tbs101.dbf (5) Block: 20 Dba:0x01400014 ------------------------------------------------------------ KTB Data Block (Table/Cluster) struct kcbh, 20 bytes @0 ub1 type_kcbh @0 ub1 frmt_kcbh @1 ub1 spare1_kcbh @2 ub1 spare2_kcbh @3 ub4 rdba_kcbh @4 ub4 bas_kcbh @8 ub2 wrp_kcbh @12 ub1 seq_kcbh @14 ub1 flg_kcbh @15 ub2 chkval_kcbh @16 ub2 spare3_kcbh @18 struct ktbbh, 72 bytes @20 ub1 ktbbhtyp @20 union ktbbhsid, 4 bytes @24 struct ktbbhcsc, 8 bytes @28 b2 ktbbhict @36 ub1 ktbbhflg @38 ub1 ktbbhfsl @39 ub4 ktbbhfnx @40 struct ktbbhitl[2], 48 bytes @44 struct kdbh, 14 bytes @100 ub1 kdbhflag @100 b1 kdbhntab @101 b2 kdbhnrow @102 sb2 kdbhfrre @104 sb2 kdbhfsbo @106 sb2 kdbhfseo @108 b2 kdbhavsp @110 b2 kdbhtosp @112 struct kdbt[1], 4 bytes @114 b2 kdbtoffs @114 b2 kdbtnrow @116 sb2 kdbr[2] @118 ub1 freespace[8040] @122 ub1 rowdata[26] @8162 ub4 tailchk @8188
Structure /element |
description |
||||||||||||||||||||||
Struct kcbh,20 bytes |
Block header structure |
||||||||||||||||||||||
---- ub1 type_kcbh |
Block type
|
||||||||||||||||||||||
---ub1 frmt_kcb |
Block format 1=oracle 7,2 =oracle 8+ |
||||||||||||||||||||||
---ub1 spare1_kcbh |
Not used |
||||||||||||||||||||||
---ub1 spare2_kchb |
Not used |
||||||||||||||||||||||
---ub4 rdba_kcbh |
Rdba- relative data block address |
||||||||||||||||||||||
---ub4 bas_kcbh |
Scn base |
||||||||||||||||||||||
----ub2 wrp_kcbh |
Scn wrap |
||||||||||||||||||||||
----ub1 seq_kcbh |
Sequence number,incremented for every change made to the block at the sam scn |
||||||||||||||||||||||
----ub1 flg_kcbh |
Flag: Ox01 new block 0x02 delayed logging change advanced scn/seq 0x04 check value saved - block XOR’s to zero 0x08 temporary block |
||||||||||||||||||||||
----ub2 chkval_kcbh |
Optional block checksun(if db_block_checksum=true) |
||||||||||||||||||||||
-----ub2 spare3_kcbh |
Not used |
||||||||||||||||||||||
Struct ktbbh ,72 bytes |
Transaction fixed header structure |
||||||||||||||||||||||
------ub1 ktbbhtyp |
Block type(1=data,2=index) |
||||||||||||||||||||||
------union ktbbhsid,4 bytes |
Segment/object id |
||||||||||||||||||||||
------struct ktbbhcsc,8 bytes |
Scn at last block cleanout |
||||||||||||||||||||||
------b2 ktbbhict |
Number of itl slots |
||||||||||||||||||||||
------ub1 ktbbhflg |
0=on the freelist |
||||||||||||||||||||||
------ub1 ktbbhfsl |
Itl tx freelist slot |
||||||||||||||||||||||
------ub4 ktbbhfnx |
Dba of next block on freelist |
||||||||||||||||||||||
------struct ktbbhitl[2],48 bytes |
Itl list index |
||||||||||||||||||||||
Struct kdbh,14 bytes |
Data header structure |
||||||||||||||||||||||
---ub1 kdbhflag |
N=pctfree hit(clusters);F=do not put on freelist;K=flushable cluster keys |
||||||||||||||||||||||
---b1 kdbhntab |
Number of tables(>1 in clusters) |
||||||||||||||||||||||
----b2 kdbhnrow |
Number of rows( 记录删除后,并不会立即在数据块中清除记录数据,仅仅是将记录标记为已删除,等真正需要已删除记录的空间时才会真正删除记录,此时kdbhnrow 的值才会发送变化) |
||||||||||||||||||||||
-----sb2 kdbhfree |
First free row entry index;-1=you have to add one |
||||||||||||||||||||||
---sb2 kdbhfsbo |
Freespace begin offset |
||||||||||||||||||||||
----sb2 kdbhfseo |
Freespace end offset |
||||||||||||||||||||||
----b2 kdbhavsp |
Available space in the block |
||||||||||||||||||||||
-----b2 kdbhtosp |
Total available space when all TXs commit |
||||||||||||||||||||||
Struct kdbt[1],4 bytes |
Table directory entry structure |
||||||||||||||||||||||
---b2 kdbtoffs |
|
||||||||||||||||||||||
----b2 kdbtnrow |
|
||||||||||||||||||||||
Sb2 kdbr[1](1指记录的数量) |
Row directory, kdbr中的每条记录存储的是数据记录在数据块中的偏移量,该偏移量是针对kdbh计算的 |
||||||||||||||||||||||
Ub1 freespace[8030] |
Free space |
||||||||||||||||||||||
Ub1 rowdata[38](38指记录占据字节数量) |
Row data |
||||||||||||||||||||||
Ub4 tailchkdocs |
The tial of an oracle 8+ block is a concatenationof the lower order two bytes of the scn base,the block type and the scn sequence number.although the tail check value is generated form three components, oracle treats the final value as a single unsigned integer stored as a word(4 bytes). On litter-endian architecture machines,which include intel the value will stores as low-order byte first..e,g A tail check of 0x97280602 stored on an intl machine would be wirtten to disk as 02062897. |
BBED> show all FILE# 5 BLOCK# 20 OFFSET 0 DBA 0x01400014 (20971540 5,20) FILENAME /home/app/oraten/oradata/oraten/tbs101.dbf BIFILE bifile.bbd LISTFILE /home/oraten/filelist.txt BLOCKSIZE 8192 MODE Edit EDIT Unrecoverable IBASE Dec OBASE Dec WIDTH 80 COUNT 512 LOGFILE log.bbd SPOOL No BBED> find /c nnn File: /home/app/oraten/oradata/oraten/tbs101.dbf (5) Block: 20 Offsets: 8169 to 8191 Dba:0x01400014 ------------------------------------------------------------------------ 6e6e6e2c 000202c1 0301622c 000202c1 02016101 06aee7 <32 bytes per line> BBED> dump File: /home/app/oraten/oradata/oraten/tbs101.dbf (5) Block: 20 Offsets: 8169 to 8191 Dba:0x01400014 ------------------------------------------------------------------------ 6e6e6e2c 000202c1 0301622c 000202c1 02016101 06aee7 <32 bytes per line> BBED> dump /v File: /home/app/oraten/oradata/oraten/tbs101.dbf (5) Block: 20 Offsets: 8169 to 8191 Dba:0x01400014 ------------------------------------------------------- 6e6e6e2c 000202c1 0301622c 000202c1 l nnn,......b,.... 02016101 06aee7 l ..a.... <16 bytes per line>
BBED> show all FILE# 5 BLOCK# 20 OFFSET 0 DBA 0x01400014 (20971540 5,20) FILENAME /home/app/oraten/oradata/oraten/tbs101.dbf BIFILE bifile.bbd LISTFILE /home/oraten/filelist.txt BLOCKSIZE 8192 MODE Edit EDIT Unrecoverable IBASE Dec OBASE Dec WIDTH 80 COUNT 512 LOGFILE log.bbd SPOOL No BBED> p kcbh.type_kcbh -------------- ub1 type_kcbh @0 0x06
BBED> p kdbr (这是第二类用法,即指定数据结构名称) sb2 kdbr[0] @118 8062 sb2 kdbr[1] @120 8072 BBED> print *kdbr[0] rowdata[0] ---------- ub1 rowdata[0] @8162 0x2c
BBED> print rowdata[7] ---------- ub1 rowdata[7] @8169 0x6e BBED> print /c rowdata[7] ---------- ub1 rowdata[7] @8169 n BBED> print /n rowdata[7] ---------- ub1 rowdata[7] @8169 110
BBED> p kcbh struct kcbh, 20 bytes @0 ub1 type_kcbh @0 0x06 ub1 frmt_kcbh @1 0xa2 ub1 spare1_kcbh @2 0x00 ub1 spare2_kcbh @3 0x00 ub4 rdba_kcbh @4 0x01400014 ub4 bas_kcbh @8 0x0006e7ae ub2 wrp_kcbh @12 0x0000 ub1 seq_kcbh @14 0x01 ub1 flg_kcbh @15 0x06 (KCBHFDLC, KCBHFCKV) ub2 chkval_kcbh @16 0xcc8e ub2 spare3_kcbh @18 0x0000
EXAMPLE
SQL> desc scott.ta Name Null? Type ----------------------------------------- -------- ---------------------------- ID NUMBER NAME VARCHAR2(10) RIQI DATE SQL> select * from scott.ta; ID NAME RIQI ---------- ---------- ------------------- 1 nnn 2014-10-07 13:19:00 2 b 2014-10-07 13:19:00 3 ss 2014-10-07 14:00:15 4 lll 2014-10-07 14:03:09
BBED> map File: /home/app/oraten/oradata/oraten/tbs101.dbf (5) Block: 21 Dba:0x01400015 ------------------------------------------------------------ KTB Data Block (Table/Cluster) struct kcbh, 20 bytes @0 struct ktbbh, 72 bytes @20 struct kdbh, 14 bytes @100 struct kdbt[1], 4 bytes @114 sb2 kdbr[2] @118 ub1 freespace[8031] @122 ub1 rowdata[35] @8153 ub4 tailchk @8188 BBED> p *kdbr[0] rowdata[18] ----------- ub1 rowdata[18] @8171 0x2c BBED> x /rnct rowdata[18] @8171 ----------- flag@8171: 0x2c (KDRHFL, KDRHFF, KDRHFH) lock@8172: 0x01 cols@8173: 3 col 0[2] @8174: 3 col 1[2] @8177: ss col 2[7] @8180: 2014-10-07 14:00:15 BBED> x /b rowdata[18] @8171 ----------- 0x2c BBED> x /h rowdata[18] @8171 ----------- 0x012c BBED> x /w rowdata[18] @8171 ----------- 0x0203012c BBED> x /l rowdata[18] @8171 ----------- 0x0203012c BBED> set offset 8153 OFFSET 8153 BBED> x /2rnct rowdata[0] @8153 ---------- flag@8153: 0x2c (KDRHFL, KDRHFF, KDRHFH) lock@8154: 0x02 cols@8155: 3 col 0[2] @8156: 4 col 1[3] @8159: lll col 2[7] @8163: 2014-10-07 14:03:09 rowdata[18] @8171 ----------- flag@8171: 0x2c (KDRHFL, KDRHFF, KDRHFH) lock@8172: 0x01 cols@8173: 3 col 0[2] @8174: 3 col 1[2] @8177: ss col 2[7] @8180: 2014-10-07 14:00:15
Find命令用来在数据块中查找数据,可以按照十进制、十六进制、八进制和字符格式进行查找,如
Switch DatatypeBBED> find /c n File: /home/app/oraten/oradata/oraten/tbs101.dbf (5) Block: 20 Offsets: 8151 to 8191 Dba:0x01400014 ------------------------------------------------------------------------ 6e6e6e07 78720a07 0e14012c 000202c1 02036e6e 6e2c0002 02c10301 622c0002 02c10201 61010694 51 <32 bytes per line> BBED> f File: /home/app/oraten/oradata/oraten/tbs101.dbf (5) Block: 20 Offsets: 8152 to 8191 Dba:0x01400014 ------------------------------------------------------------------------ 6e6e0778 720a070e 14012c00 0202c102 036e6e6e 2c000202 c1030162 2c000202 c1020161 01069451 <32 bytes per line> BBED> f File: /home/app/oraten/oradata/oraten/tbs101.dbf (5) Block: 20 Offsets: 8153 to 8191 Dba:0x01400014 ------------------------------------------------------------------------ 6e077872 0a070e14 012c0002 02c10203 6e6e6e2c 000202c1 0301622c 000202c1 02016101 069451 <32 bytes per line>
BBED> help assign ASSIGN[/x|d|u|o] <target spec>=<source spec> <target spec> : [ DBA | FILE | FILENAME | BLOCK | OFFSET | symbol | *symbol ] <source spec> : [ value | <target spec options> ] 使用过程中,我们可以省略源或者目标,省略部分被当前offset所在的数据结构代替。在使用assign命令时,虽然我们可以指定offset,但实际上被赋值的是offset所在位置的数据结构,如: BBED> print kcbh struct kcbh, 20 bytes @0 ub1 type_kcbh @0 0x06 ub1 frmt_kcbh @1 0x02 ub1 spare1_kcbh @2 0x00 ub1 spare2_kcbh @3 0x00 ub4 rdba_kcbh @4 0x01400014 ub4 bas_kcbh @8 0x00075194 ub2 wrp_kcbh @12 0x0000 ub1 seq_kcbh @14 0x01 ub1 flg_kcbh @15 0x06 (KCBHFDLC, KCBHFCKV) ub2 chkval_kcbh @16 0xae67 ub2 spare3_kcbh @18 0x0000 BBED> assign 9=1 ub4 bas_kcbh @8 0x00000001 BBED> print kcbh struct kcbh, 20 bytes @0 ub1 type_kcbh @0 0x06 ub1 frmt_kcbh @1 0x02 ub1 spare1_kcbh @2 0x00 ub1 spare2_kcbh @3 0x00 ub4 rdba_kcbh @4 0x01400014 ub4 bas_kcbh @8 0x00000001 ub2 wrp_kcbh @12 0x0000 ub1 seq_kcbh @14 0x01 ub1 flg_kcbh @15 0x06 (KCBHFDLC, KCBHFCKV) ub2 chkval_kcbh @16 0xae67 ub2 spare3_kcbh @18 0x0000 BBED> assign 9=0x00075194 ub4 bas_kcbh @8 0x00075194
原文地址:http://blog.csdn.net/yidian815/article/details/39990803