Chinaunix首页 | 论坛 | 博客
  • 博客访问: 518643
  • 博文数量: 101
  • 博客积分: 1635
  • 博客等级: 上尉
  • 技术积分: 1282
  • 用 户 组: 普通用户
  • 注册时间: 2012-07-05 01:51
文章分类

全部博文(101)

文章存档

2019年(2)

2018年(16)

2013年(14)

2012年(69)

我的朋友

分类: Oracle

2018-11-13 14:46:07

create table t1 as select object_id,object_name from dba_objects where object_id<10;
alter system switch logfile;
SQL> select member from v$logfile;


MEMBER
--------------------------------------------------------------------------------
/home/oracle/app/oradata/oracleogg/redo03.log
/home/oracle/app/oradata/oracleogg/redo02.log
/home/oracle/app/oradata/oracleogg/redo01.log


SQL> 
select a.*,dbms_rowid.rowid_relative_fno(rowid) file#,dbms_rowid.rowid_block_number(rowid) blk#
      from t1 a
    order by object_id;
 OBJECT_ID OBJECT_NAME               FILE#       BLK#
---------- -------------------- ---------- ----------
         2 C_OBJ#                        1      95233
         3 I_OBJ#                        1      95233
         4 TAB$                          1      95233
         5 CLU$                          1      95233
         6 C_TS#                         1      95233
         7 I_TS#                         1      95233
         8 C_FILE#_BLOCK#                1      95233
         9 I_FILE#_BLOCK#                1      95233
8 rows selected


SQL> select dump('C_OBJ#',16) from dual;


DUMP('C_OBJ#',16)
-------------------------------
Typ=96 Len=6: 43,5f,4f,42,4a,23


oradebug setmypid;
alter system dump datafile 1 block 95233;
oradebug tracefile_name;




Block header dump:  0x00417401
 Object id on Block? Y
 seg/obj: 0x15a1d  csc: 0x00.27b755  itc: 3  flg: -  typ: 1 - DATA
     fsl: 0  fnx: 0x0 ver: 0x01


 Itl           Xid                  Uba         Flag  Lck        Scn/Fsc
0x01   0xffff.000.00000000  0x00000000.0000.00  C---    0  scn 0x0000.0027b755
0x02   0x0000.000.00000000  0x00000000.0000.00  ----    0  fsc 0x0000.00000000
0x03   0x0000.000.00000000  0x00000000.0000.00  ----    0  fsc 0x0000.00000000
bdba: 0x00417401
data_block_dump,data header at 0x7f2010810074
===============
tsiz: 0x1f88
hsiz: 0x22
pbl: 0x7f2010810074
     76543210
flag=--------
ntab=1
nrow=8
frre=-1
fsbo=0x22
fseo=0x1f16
avsp=0x1ef4
tosp=0x1ef4
0xe:pti[0]      nrow=8  offs=0
0x12:pri[0]     offs=0x1f7b
0x14:pri[1]     offs=0x1f6e
0x16:pri[2]     offs=0x1f63
0x18:pri[3]     offs=0x1f58
0x1a:pri[4]     offs=0x1f4c
0x1c:pri[5]     offs=0x1f40
0x1e:pri[6]     offs=0x1f2b
0x20:pri[7]     offs=0x1f16
block_row_dump:
tab 0, row 0, @0x1f7b
tl: 13 fb: --H-FL-- lb: 0x0  cc: 2
col  0: [ 2]  c1 03
col  1: [ 6]  43 5f 4f 42 4a 23  -------------这是object_id=2的这条记录
tab 0, row 1, @0x1f6e
tl: 13 fb: --H-FL-- lb: 0x0  cc: 2
col  0: [ 2]  c1 04
col  1: [ 6]  49 5f 4f 42 4a 23
tab 0, row 2, @0x1f63
tl: 11 fb: --H-FL-- lb: 0x0  cc: 2
col  0: [ 2]  c1 05
col  1: [ 4]  54 41 42 24
tab 0, row 3, @0x1f58
tl: 11 fb: --H-FL-- lb: 0x0  cc: 2
col  0: [ 2]  c1 06
col  1: [ 4]  43 4c 55 24
tab 0, row 4, @0x1f4c
tl: 12 fb: --H-FL-- lb: 0x0  cc: 2
col  0: [ 2]  c1 07
col  1: [ 5]  43 5f 54 53 23
tab 0, row 5, @0x1f40
tl: 12 fb: --H-FL-- lb: 0x0  cc: 2
col  0: [ 2]  c1 08
col  1: [ 5]  49 5f 54 53 23
tab 0, row 6, @0x1f2b
tl: 21 fb: --H-FL-- lb: 0x0  cc: 2
col  0: [ 2]  c1 09
col  1: [14]  43 5f 46 49 4c 45 23 5f 42 4c 4f 43 4b 23
tab 0, row 7, @0x1f16
tl: 21 fb: --H-FL-- lb: 0x0  cc: 2
col  0: [ 2]  c1 0a
col  1: [14]  49 5f 46 49 4c 45 23 5f 42 4c 4f 43 4b 23
end_of_block_dump
End dump data blocks tsn: 0 file#: 1 minblk 95233 maxblk 95233


*** 2015-11-10 18:06:05.809
Processing Oradebug command 'tracefile_name'


*** 2015-11-10 18:06:05.810
Oradebug command 'tracefile_name' console output:
/home/oracle/app/diag/rdbms/oracleogg/oracleogg/trace/oracleogg_ora_8171.trc
+++++++++++++++++++观察delete的变化++++++++++++++
###session1
SQL> delete from t1 where object_id=2;


1 row deleted.


SQL> commit;


Commit complete.
###session2
SQL> oradebug tracefile_name;
/home/oracle/app/diag/rdbms/oracleogg/oracleogg/trace/oracleogg_ora_2140.trc
SQL> oradebug setmypid; 
Statement processed.
SQL> alter system dump logfile '/home/oracle/app/oradata/oracleogg/redo01.log' dba min 1 95233 dba max 1 95233;


System altered.


SQL> alter system dump datafile 1 block 95233;


System altered.


SQL> oradebug tracefile_name;
/home/oracle/app/diag/rdbms/oracleogg/oracleogg/trace/oracleogg_ora_2140.trc


dba 就是data block address
此时的redo logfile dump 如下:
DUMP OF REDO FROM FILE '/home/oracle/app/oradata/oracleogg/redo01.log'
 Opcodes *.*
 DBAs: (file # 1, block # 95233) thru (file # 1, block # 95233)
 RBAs: 0x000000.00000000.0000 thru 0xffffffff.ffffffff.ffff
 SCNs: scn: 0x0000.00000000 thru scn: 0xffff.ffffffff
 Times: creation thru eternity
 FILE HEADER:
Compatibility Vsn = 186647552=0xb200400
Db ID=2293327052=0x88b164cc, Db Name='ORACLEOG'
Activation ID=2298197299=0x88fbb533
Control Seq=8445=0x20fd, File size=102400=0x19000
File Number=1, Blksiz=512, File Type=2 LOG
 descrip:"Thread 0001, Seq# 0000000043, SCN 0x00000021d644-0xffffffffffff"
 thread: 1 nab: 0xffffffff seq: 0x0000002b hws: 0x1 eot: 1 dis: 0
 resetlogs count: 0x3516945c scn: 0x0000.001c1576 (1840502)
 prev resetlogs count: 0x35166d28 scn: 0x0000.001c027b (1835643)
 Low  scn: 0x0000.0021d644 (2217540) 11/17/2015 09:34:07
 Next scn: 0xffff.ffffffff 01/01/1988 00:00:00
 Enabled scn: 0x0000.001c1576 (1840502) 09/17/2015 16:57:00
 Thread closed scn: 0x0000.0021d644 (2217540) 11/17/2015 09:34:07
 Disk cksum: 0xb731 Calc cksum: 0xb731
 Terminal recovery stop scn: 0x0000.00000000
 Terminal recovery  01/01/1988 00:00:00
 Most recent redo scn: 0x0000.00000000
 Largest LWN: 0 blocks
 End-of-redo stream : No
 Unprotected mode
 Miscellaneous flags: 0x800000
 Thread internal enable indicator: thr: 0, seq: 0 scn: 0x0000.00000000
 Zero blocks: 0
 Format ID is 2
 redo log key is 5186c5382da912db512fb15e42d016
 redo log key flag is 5
 Enabled redo threads: 1 
 
REDO RECORD - Thread:1 RBA: 0x00002b.00000003.0010 LEN: 0x02f0 VLD: 0x0d
SCN: 0x0000.0021d67b SUBSCN:  1 11/17/2015 09:36:50
(LWN RBA: 0x00002b.00000003.0010 LEN: 0002 NST: 0001 SCN: 0x0000.0021d67a)
CHANGE #1 TYP:0 CLS:1 AFN:1 DBA:0x00417401 OBJ:87641 SCN:0x0000.0021d62a SEQ:2 OP:11.3 ENC:0 RBL:0
KTB Redo 
op: 0x01  ver: 0x01  
compat bit: 4 (post-11) padding: 1
op: F  xid:  0x0005.01d.00000508    uba: 0x00c002a9.01b2.04
KDO Op code: DRP row dependencies Disabled
  xtype: XA flags: 0x00000000  bdba: 0x00417401  hdba: 0x00417400
itli: 2  ispac: 0  maxfr: 4863
tabn: 0 slot: 0(0x0)
CHANGE #2 TYP:0 CLS:25 AFN:3 DBA:0x00c000c0 OBJ:4294967295 SCN:0x0000.0021d5ca SEQ:1 OP:5.2 ENC:0 RBL:0
ktudh redo: slt: 0x001d sqn: 0x00000508 flg: 0x0012 siz: 160 fbi: 0
            uba: 0x00c002a9.01b2.04    pxid:  0x0000.000.00000000
CHANGE #3 TYP:0 CLS:1 AFN:1 DBA:0x00417401 OBJ:87641 SCN:0x0000.0021d67b SEQ:1 OP:13.6 ENC:0 RBL:0
KTSFRBLNK (block link modify) redo:  Opcode: LSET (lock set)
Next dba: 0x00000000 itli: 2
KTB Redo 
op: 0x02  ver: 0x01  
compat bit: 4 (post-11) padding: 1
op: C  uba: 0x00c002a9.01b2.05
CHANGE #4 TYP:0 CLS:4 AFN:1 DBA:0x00417400 OBJ:87641 SCN:0x0000.0021d62e SEQ:1 OP:13.7 ENC:0 RBL:0
KTSFRGRP (fgb/shdr modify freelist) redo:
 Opcode: LNEW (list new)
Slot no: 1, Count: 1
Flag: = 1 xid or slot0 ccnt:  0x0005.01d.00000508 Head:  0x00417401 Tail:  0x00417401 
CHANGE #5 TYP:0 CLS:25 AFN:3 DBA:0x00c000c0 OBJ:4294967295 SCN:0x0000.0021d67b SEQ:1 OP:5.4 ENC:0 RBL:0
ktucm redo: slt: 0x001d sqn: 0x00000508 srt: 0 sta: 9 flg: 0x2 ktucf redo: uba: 0x00c002a9.01b2.05 ext: 3 spc: 7496 fbi: 0 
CHANGE #6 TYP:0 CLS:26 AFN:3 DBA:0x00c002a9 OBJ:4294967295 SCN:0x0000.0021d5c9 SEQ:1 OP:5.1 ENC:0 RBL:0
ktudb redo: siz: 160 spc: 7760 flg: 0x0012 seq: 0x01b2 rec: 0x04
            xid:  0x0005.01d.00000508  
ktubl redo: slt: 29 rci: 0 opc: 11.1 [objn: 87641 objd: 87641 tsn: 0]
Undo type:  Regular undo        Begin trans    Last buffer split:  No 
Temp Object:  No 
Tablespace Undo:  No 
             0x00000000  prev ctl uba: 0x00c002a9.01b2.03 
prev ctl max cmt scn:  0x0000.00217f9b  prev tx cmt scn:  0x0000.00218001 
txn start scn:  0x0000.0021d630  logon user: 0  prev brb: 12583591  prev bcl: 0 BuExt idx: 0 flg2: 0
KDO undo record:
KTB Redo 
op: 0x03  ver: 0x01  
compat bit: 4 (post-11) padding: 1
op: Z
KDO Op code: IRP row dependencies Disabled
  xtype: XA flags: 0x00000000  bdba: 0x00417401  hdba: 0x00417400
itli: 2  ispac: 0  maxfr: 4863
tabn: 0 slot: 0(0x0) size/delt: 13
fb: --H-FL-- lb: 0x0  cc: 2
null: --
col  0: [ 2]  c1 03
col  1: [ 6]  43 5f 4f 42 4a 23
CHANGE #7 TYP:0 CLS:26 AFN:3 DBA:0x00c002a9 OBJ:4294967295 SCN:0x0000.0021d67b SEQ:1 OP:5.1 ENC:0 RBL:0
ktudb redo: siz: 100 spc: 7598 flg: 0x0022 seq: 0x01b2 rec: 0x05
            xid:  0x0005.01d.00000508  
ktubu redo: slt: 29 rci: 4 opc: 13.9 objn: 87641 objd: 87641 tsn: 0
Undo type:  Regular undo       Undo type:  Last buffer split:  No 
Tablespace Undo:  No 
             0x00000000
KTSFUNLK (xnt freelist link) undo:
freelist header block  tsn: 0  rdba: 0x00417400  class: 4
block rdba: 0x00417401
itl index: 2
Opcode: LUPD_UNLBLK (unlink block)
Slot no: 1, Count: 1
Flag: = 1 xid or slot0 ccnt:  0x0000.000.00000000 Head:  0x00000000 Tail:  0x00000000 
KTB Redo 
op: 0x02  ver: 0x01  
compat bit: 4 (post-11) padding: 1
op: C  uba: 0x00c002a9.01b2.04
 
REDO RECORD - Thread:1 RBA: 0x00002b.00000015.0038 LEN: 0x0054 VLD: 0x02
SCN: 0x0000.0021d6a4 SUBSCN:  1 11/17/2015 09:38:28
(LWN RBA: 0x00002b.00000014.0010 LEN: 0002 NST: 0001 SCN: 0x0000.0021d6a4)
CHANGE #1 MEDIA RECOVERY MARKER SCN:0x0000.00000000 SEQ:0 OP:23.1 ENC:0
 Block Written - afn: 1 rdba: 0x00417400 BFT:(1024,4289536) non-BFT:(1,95232)
                   scn: 0x0000.0021d67b seq: 0x01 flg:0x04
 Block Written - afn: 1 rdba: 0x00417401 BFT:(1024,4289537) non-BFT:(1,95233)
                   scn: 0x0000.0021d67b seq: 0x03 flg:0x06
END OF REDO DUMP
----- Redo read statistics for thread 1 -----
Read rate (SYNC): 1342Kb in 0.03s => 43.70 Mb/sec
Total redo bytes: 2047Kb Longest record: 12Kb, moves: 1/2756 moved: 0Mb (0%)
Longest LWN: 570Kb, reads: 88 
Last redo scn: 0x0000.0021d92f (2218287)
Change vector header moves = 316/5088 (6%)
----------------------------------------------
有四个主要的opcode
从上面的redo logfile dump我们可以看到,上面涉及到2个redo record,其中第一个redo record是我们的数据块变更
对于的redo信息.同时也可以看到里面有4个change vector.
而这4个change vector的关系如下:
CHANGE #1 TYP:0 CLS:1 AFN:1 DBA:0x00417401 OBJ:87641 SCN:0x0000.0021d62a SEQ:2 OP:11.3 ENC:0 RBL:0  --drop row piece
CHANGE #2 TYP:0 CLS:25 AFN:3 DBA:0x00c000c0 OBJ:4294967295 SCN:0x0000.0021d5ca SEQ:1 OP:5.2 ENC:0 RBL:0 --表示事务的开始
CHANGE #5 TYP:0 CLS:25 AFN:3 DBA:0x00c000c0 OBJ:4294967295 SCN:0x0000.0021d67b SEQ:1 OP:5.4 ENC:0 RBL:0 --表示事务commit
CHANGE #6 TYP:0 CLS:26 AFN:3 DBA:0x00c002a9 OBJ:4294967295 SCN:0x0000.0021d5c9 SEQ:1 OP:5.1 ENC:0 RBL:0  --表示修改undo header 中的事务信息
实际这四个的change vector的顺序应该是如下关系:
change#6 -->change#2-->change#1-->change#5




ktudb redo: siz: 160 spc: 7760 flg: 0x0012 seq: 0x01b2 rec: 0x04
            xid:  0x0005.01d.00000508  
ktubl redo: slt: 29 rci: 0 opc: 11.1 [objn: 87641 objd: 87641 tsn: 0]
Undo type:  Regular undo        Begin trans    Last buffer split:  No 
Temp Object:  No 
Tablespace Undo:  No 
             0x00000000  prev ctl uba: 0x00c002a9.01b2.03 
prev ctl max cmt scn:  0x0000.00217f9b  prev tx cmt scn:  0x0000.00218001 
txn start scn:  0x0000.0021d630  logon user: 0  prev brb: 12583591  prev bcl: 0 BuExt idx: 0 flg2: 0
KDO undo record:
KTB Redo 
op: 0x03  ver: 0x01  
compat bit: 4 (post-11) padding: 1
op: Z
KDO Op code: IRP row dependencies Disabled
  xtype: XA flags: 0x00000000  bdba: 0x00417401  hdba: 0x00417400---这里的bdba其实就是对应的该data block的地址转换后即为 file 1 block 95233
itli: 2  ispac: 0  maxfr: 4863
tabn: 0 slot: 0(0x0) size/delt: 13
fb: --H-FL-- lb: 0x0  cc: 2
null: --
col  0: [ 2]  c1 03    ----这是第一列
col  1: [ 6]  43 5f 4f 42 4a 23 ---这是第二列


大家可以通过dump来观察:


SQL> select dump('C_OBJ#',16) from dual;


DUMP('C_OBJ#',16)
-------------------------------
Typ=96 Len=6: 43,5f,4f,42,4a,23


我们再来看一下 opcode为11.3的记录,该操作其实就是对应我们的delete操作:
SCN: 0x0000.0021d67b SUBSCN:  1 11/17/2015 09:36:50
(LWN RBA: 0x00002b.00000003.0010 LEN: 0002 NST: 0001 SCN: 0x0000.0021d67a)
CHANGE #1 TYP:0 CLS:1 AFN:1 DBA:0x00417401 OBJ:87641 SCN:0x0000.0021d62a SEQ:2 OP:11.3 ENC:0 RBL:0
KTB Redo 
op: 0x01  ver: 0x01  
compat bit: 4 (post-11) padding: 1
op: F  xid:  0x0005.01d.00000508    uba: 0x00c002a9.01b2.04
KDO Op code: DRP row dependencies Disabled
  xtype: XA flags: 0x00000000  bdba: 0x00417401  hdba: 0x00417400
itli: 2  ispac: 0  maxfr: 4863
tabn: 0 slot: 0(0x0)


AFN:表示相对应文件号1
DBA:0x00417401 表示该记录所对应的数据块地址
 SCN:0x0000.0021d62a 表示scn值,不过这里并不是该事务的commit scn,其中commit scn是上面的0021d67b 。
xid:  0x0005.01d.00000508 表示该事务的标示,其中5表示回滚段编号,1d表示slot编号。
slot:1d(0x1d)表示事务槽编号,即为29
uba: 0x00c002a9.01b2.04 表示uba地址
根据uba地址,我们可以也得到该block记录的前镜像,如下:
 select dbms_utility.data_block_address_file(TO_NUMBER('c002a9', 'XXXXXXXX')) file_id ,
   dbms_utility.data_block_address_block(TO_NUMBER('c002a9', 'XXXXXXXX')) block_id from dual;
  FILE_ID   BLOCK_ID
---------- ----------
         3        681






转出undo block


alter system dump datafile 3 block 681;
uba: 0x00c002a9.01b2.03 ctl max scn: 0x0000.00217f9b prv tx scn: 0x0000.00218001
txn start scn: scn: 0x0000.0021d630 logon user: 0
 prev brb: 12583591 prev bcl: 0
KDO undo record:
KTB Redo 
op: 0x03  ver: 0x01  
compat bit: 4 (post-11) padding: 1
op: Z
KDO Op code: IRP row dependencies Disabled
  xtype: XA flags: 0x00000000  bdba: 0x00417401  hdba: 0x00417400
itli: 2  ispac: 0  maxfr: 4863
tabn: 0 slot: 0(0x0) size/delt: 13
fb: --H-FL-- lb: 0x0  cc: 2
null: --
col  0: [ 2]  c1 03
col  1: [ 6]  43 5f 4f 42 4a 23 --看看这里。。
首先我们来看下block dump:
Block header dump:  0x00417401
 Object id on Block? Y
 seg/obj: 0x15659  csc: 0x00.21d629  itc: 3  flg: O  typ: 1 - DATA
     fsl: 2  fnx: 0x0 ver: 0x01
 
 Itl           Xid                  Uba         Flag  Lck        Scn/Fsc
0x01   0xffff.000.00000000  0x00000000.0000.00  C---    0  scn 0x0000.0021d629
0x02   0x0005.01d.00000508  0x00c002a9.01b2.05  --U-    2  fsc 0x000b.0021d67b
0x03   0x0000.000.00000000  0x00000000.0000.00  ----    0  fsc 0x0000.00000000
bdba: 0x00417401
data_block_dump,data header at 0x7ff66b70ea74
===============
tsiz: 0x1f88
hsiz: 0x22
pbl: 0x7ff66b70ea74
     76543210
flag=--------
ntab=1
nrow=8
frre=-1
fsbo=0x22
fseo=0x1f16
avsp=0x1ef4
tosp=0x1f01
0xe:pti[0] nrow=8 offs=0
0x12:pri[0] offs=0x1f7b
0x14:pri[1] offs=0x1f6e
0x16:pri[2] offs=0x1f63
0x18:pri[3] offs=0x1f58
0x1a:pri[4] offs=0x1f4c
0x1c:pri[5] offs=0x1f40
0x1e:pri[6] offs=0x1f2b
0x20:pri[7] offs=0x1f16
block_row_dump:
tab 0, row 0, @0x1f7b
tl: 2 fb: --HDFL-- lb: 0x2 ------------------------可以看到该记录被标记删除了,但是nrow仍然是8,并没有变化。
tab 0, row 1, @0x1f6e
tl: 13 fb: --H-FL-- lb: 0x0  cc: 2
col  0: [ 2]  c1 04
col  1: [ 6]  49 5f 4f 42 4a 23
tab 0, row 2, @0x1f63
tl: 11 fb: --H-FL-- lb: 0x0  cc: 2
col  0: [ 2]  c1 05
col  1: [ 4]  54 41 42 24
tab 0, row 3, @0x1f58
tl: 11 fb: --H-FL-- lb: 0x0  cc: 2
col  0: [ 2]  c1 06
col  1: [ 4]  43 4c 55 24
tab 0, row 4, @0x1f4c
tl: 12 fb: --H-FL-- lb: 0x0  cc: 2
col  0: [ 2]  c1 07
col  1: [ 5]  43 5f 54 53 23
tab 0, row 5, @0x1f40
tl: 12 fb: --H-FL-- lb: 0x0  cc: 2
col  0: [ 2]  c1 08
col  1: [ 5]  49 5f 54 53 23
tab 0, row 6, @0x1f2b
tl: 21 fb: --H-FL-- lb: 0x0  cc: 2
col  0: [ 2]  c1 09
col  1: [14]  43 5f 46 49 4c 45 23 5f 42 4c 4f 43 4b 23
tab 0, row 7, @0x1f16
tl: 21 fb: --H-FL-- lb: 0x0  cc: 2
col  0: [ 2]  c1 0a
col  1: [14]  49 5f 46 49 4c 45 23 5f 42 4c 4f 43 4b 23






++++++++++++++++++++++++++++++++
0x01   0xffff.000.00000000  0x00000000.0000.00  C---    0  scn 0x0000.0021d629
0x02   0x0005.01d.00000508  0x00c002a9.01b2.05  --U-    2  fsc 0x000b.0021d67b


[oracle@oracle-ogg2 ~]$ vi parfile.conf
blocksize=8192
listfile=/home/oracle/siyang.txt
mode=edit
[oracle@oracle-ogg2 ~]$ bbed parfile=parfile.conf 
Password: 


BBED: Release 2.0.0.0.0 - Limited Production on Tue Nov 17 17:42:36 2015


Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


************* !!! For Oracle Internal Use only !!! ***************


BBED> set file 1 block 95233;
        FILE#           1
        BLOCK#          95233


BBED> p kdbr
sb2 kdbr[0]                                 @134      8059
sb2 kdbr[1]                                 @136      8046
sb2 kdbr[2]                                 @138      8035
sb2 kdbr[3]                                 @140      8024
sb2 kdbr[4]                                 @142      8012
sb2 kdbr[5]                                 @144      8000
sb2 kdbr[6]                                 @146      7979
sb2 kdbr[7]                                 @148      7958


BBED> p *kdbr[0]
rowdata[101]
------------
ub1 rowdata[101]                            @8175     0x3c


BBED> d /v
 File: /home/oracle/app/oradata/oracleogg/system01.dbf (1)
 Block: 95233   Offsets: 8175 to 8191  Dba:0x00417401
-------------------------------------------------------
 3c020202 c1030643 5f4f424a 2303067b l <..._OBJ#..{
 d6                                  l 
 <16 bytes per line>




3c020202 c1030643 5f4f424a 23


3c----行头标示
3c后面的02表示该事务所对应的itl编号,0表示没事务
第一个02---表示列个数
02c103----表示该行数据的第1列,其中02表示该列的长度,c103是实际的列数据
0643 5f4f424a 23 ---表示该行数据的第二列,其中06表示该列的长度,43 5f4f424a 23是实际的列数据。


当删除后,bbedi的dump
如何计算该行准确的offset 呢?
针对 assm,offset=offset+76*(itl-1)*24=7958+76+(3-1)*24=8082
阅读(2896) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~