`
liwenshui322
  • 浏览: 511307 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Oracle事务原理探究2--读书笔记五

阅读更多

续上篇...

3.  数据块访问与undo

        任何时候当会话查看一个数据块的时候,都需要保证看到的是适当的数据版本。从外部观点来看,这意味着会话不应该看到任何未提交的数据,或许还不应该看到查询开始后修改并提交的数据(取决于事务的隔离级别),这称为数据的读一致性版本。

        下面我们来谈谈oracle怎么实现读一致性版本的:

3.1 设置场景

        我们会创建一张表,里面插入3条数据,然后开几个会话对其进行操作

3.1.1 连接oracle,以任何一个用户登录即可,初始化一些格式

 

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. execute dbms_random.seed(0)  
  2.   
  3. set doc off  
  4. doc  
  5.   
  6. end doc is marked with #  
  7.   
  8. #  
  9.   
  10. set linesize 120  
  11. set trimspool on  
  12. set pagesize 24  
  13. set arraysize 25  
  14.   
  15. -- set longchunksize 32768  
  16. -- set long 32768  
  17.   
  18. set autotrace off  
  19.   
  20. clear breaks  
  21. ttitle off  
  22. btitle off  
  23.   
  24. column owner format a15  
  25. column segment_name format a20  
  26. column table_name format a20  
  27. column index_name format a20  
  28. column object_name format a20  
  29. column subobject_name format a20  
  30. column partition_name format a20  
  31. column subpartition_name format a20  
  32. column column_name format a20  
  33. column column_expression format a40 word wrap  
  34. column constraint_name format a20  
  35.   
  36. column referenced_name format a30  
  37.   
  38. column file_name format a60  
  39.   
  40. column low_value format a24  
  41. column high_value format a24  
  42.   
  43. column parent_id_plus_exp   format 999  
  44. column id_plus_exp      format 990  
  45. column plan_plus_exp        format a90  
  46. column object_node_plus_exp format a14  
  47. column other_plus_exp       format a90  
  48. column other_tag_plus_exp   format a29  
  49.   
  50. column access_predicates    format a80  
  51. column filter_predicates    format a80  
  52. column projection       format a80  
  53. column remarks          format a80  
  54. column partition_start      format a12  
  55. column partition_stop       format a12  
  56. column partition_id     format 999  
  57. column other_tag        format a32  
  58. column object_alias     format a24  
  59.   
  60. column object_node      format a13  
  61. column  other           format a150  
  62.   
  63. column os_username      format a30  
  64. column terminal         format a24  
  65. column userhost         format a24  
  66. column client_id        format a24  
  67.   
  68. column statistic_name format a35  
  69.   
  70. column namespace format a20  
  71. column attribute format a20  
  72.   
  73. column hint format a40  
  74.   
  75. column start_time   format a25  
  76. column end_time     format a25  
  77.   
  78. column time_now noprint new_value m_timestamp  
  79.   
  80. set feedback off  
  81.   
  82. select to_char(sysdate,'hh24miss') time_now from dual;  
  83. commit;  
  84.   
  85. set feedback on  
  86.   
  87. set timing off  
  88. set verify off  
  89.   
  90. alter session set optimizer_mode = all_rows;  
  91.   
  92. spool log  

3.1.2 创建表

 

 

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. drop table t1;  
  2.   
  3. create table t1(id number, n1 number);  
  4.   
  5. insert into t1 values(1,1);  
  6. insert into t1 values(2,2);  
  7. insert into t1 values(3,3);  
  8.   
  9. commit;  
  10.   
  11. create unique index t1_i1 on t1(id);  
  12.   
  13. begin  
  14.     dbms_stats.gather_table_stats(  
  15.         ownname      => user,  
  16.         tabname      =>'T1',  
  17.         estimate_percent => 100,  
  18.         method_opt   => 'for all columns size 1'  
  19.     );  
  20. end;  
  21. /  
  22.   
  23. --  
  24. --<span style="white-space:pre">  </span>For 11g - force to disc for the dump  
  25. --  
  26.   
  27.   
  28. alter system checkpoint;  

3.1.3 创建一个存储过程,用来转储一个表使用的第一个数据块。

 

 

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. create or replace procedure dump_table_block(  
  2.     i_tab_name      in  varchar2,  
  3.     i_owner         in  varchar2    default sys_context('userenv','session_user')  
  4. )  
  5. as  
  6.     m_file_id   number;  
  7.     m_block     number;  
  8.     m_process   varchar2(32);  
  9.   
  10. begin  
  11.   
  12.     execute immediate  
  13.         ' select ' ||  
  14.             ' dbms_rowid.rowid_relative_fno(rowid), ' ||  
  15.             ' dbms_rowid.rowid_block_number(rowid)  ' ||  
  16.         ' from ' ||  
  17.             i_owner ||   
  18.             '.' ||  
  19.             i_tab_name ||  
  20.         ' where ' ||  
  21.             ' rownum = 1 '  
  22.         into  
  23.             m_file_id, m_block  
  24.     ;  
  25.   
  26.     execute immediate  
  27.         'alter system dump datafile ' || m_file_id ||  
  28.         ' block ' || m_block  
  29.     ;  
  30.   
  31. --  
  32. --  For non-MTS, work out the trace file name  
  33. --  
  34.   
  35.     select  
  36.         spid  
  37.     into  
  38.         m_process  
  39.     from  
  40.         v$session   se,  
  41.         v$process   pr  
  42.     where  
  43. --  
  44. --      The first option is the 9.2 version for checking the SID  
  45. --      The second is a quick and dirty option for 8.1.7  
  46. --      provided SYS has made v$mystat visible (or this is the sys account)  
  47. --  
  48. --      se.sid = (select dbms_support.mysid from dual)  
  49.         se.sid = (select sid from v$mystat where rownum = 1)  
  50.     and pr.addr = se.paddr  
  51.     ;  
  52.   
  53.     dbms_output.new_line;  
  54.     dbms_output.put_line('Trace file name includes: ' || m_process);  
  55.     dbms_output.new_line;  
  56.   
  57. exception  
  58.     when others then  
  59.         dbms_output.new_line;  
  60.         dbms_output.put_line('Unspecified error.');  
  61.         dbms_output.put_line('Check syntax.');  
  62.         dbms_output.put_line('dump_table_block({table_name},[{owner}]');  
  63.         dbms_output.new_line;  
  64.         raise;  
  65. end;  
  66. .  
  67. /  
  68.   
  69. show errors  
  70.   
  71. drop public synonym dump_table_block;  
  72. create public synonym dump_table_block for dump_table_block;  
  73. grant execute on dump_table_block to public;  


3.1.4 转储表t1的第一个数据块

 

 

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. execute dump_table_block('t1')  

 

 

3.1.5 我们会看到:Trace file name includes: 4292这样的字样,到oracle 的trace目录找到这个跟踪文件,我的电脑入戏所示:

E:\app\Administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_4292.trc,  双击用记事本打开,可以看到如下内容:

 

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. Block header dump:  0x00416169  
  2.  Object id on Block? Y  
  3.  seg/obj: 0x12e7a  csc: 0x00.326fb7  itc: 2  flg: O  typ: 1 - DATA  
  4.      fsl: 0  fnx: 0x0 ver: 0x01  
  5.    
  6.  Itl           Xid                  Uba         Flag  Lck        Scn/Fsc  
  7. 0x01   0x0002.005.000005f5  0x00c00b18.0121.0d  --U-    3  fsc 0x0000.00326fb8  
  8. 0x02   0x0000.000.00000000  0x00000000.0000.00  ----    0  fsc 0x0000.00000000  
  9. bdba: 0x00416169  
  10. data_block_dump,data header at 0x1e256e5c  
  11. ===============  
  12. tsiz: 0x1fa0  
  13. hsiz: 0x18  
  14. pbl: 0x1e256e5c  
  15.      76543210  
  16. flag=--------  
  17. ntab=1  
  18. nrow=3  
  19. frre=-1  
  20. fsbo=0x18  
  21. fseo=0x1f85  
  22. avsp=0x1f6d  
  23. tosp=0x1f6d  
  24. 0xe:pti[0]  nrow=3  offs=0  
  25. 0x12:pri[0] offs=0x1f97  
  26. 0x14:pri[1] offs=0x1f8e  
  27. 0x16:pri[2] offs=0x1f85  
  28. block_row_dump:  
  29. tab 0, row 0, @0x1f97  
  30. tl: 9 fb: --H-FL-- lb: 0x1  cc: 2  
  31. col  0: [ 2]  c1 02  
  32. col  1: [ 2]  c1 02  
  33. tab 0, row 1, @0x1f8e  
  34. tl: 9 fb: --H-FL-- lb: 0x1  cc: 2  
  35. col  0: [ 2]  c1 03  
  36. col  1: [ 2]  c1 03  
  37. tab 0, row 2, @0x1f85  
  38. tl: 9 fb: --H-FL-- lb: 0x1  cc: 2  
  39. col  0: [ 2]  c1 04  
  40. col  1: [ 2]  c1 04  
  41. end_of_block_dump  
  42. End dump data blocks tsn: 0 file#: 1 minblk 90473 maxblk 90473  
  43. Start dump data blocks tsn: 0 file#:1 minblk 90473 maxblk 90473  


3.2 事务列表
        这一节,简要介绍一下转储出来的数据块中事务槽的信息,上面数据块的事务槽如下:

 

 

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1.  Itl           Xid                  Uba         Flag  Lck        Scn/Fsc  
  2. 0x01   0x0002.005.000005f5  0x00c00b18.0121.0d  --U-    3  fsc 0x0000.00326fb8  
  3. 0x02   0x0000.000.00000000  0x00000000.0000.00  ----    0  fsc 0x0000.00000000  

Itl:列表的数组索引,该值未真正存储在数据块中,它由执行转储的代码生成。该值用在行的锁字节(lb:)中以显示哪个事务锁住了该行。

 

Xid: 最近更改该块的事务的事务id,格式是undo段.undo槽.undo序列号.

Uba: undo记录地址,是事务为该块最近生成的undo记录所在块的序列号。

Flag: 标识事务当前状态

          ----  活动(当Xid中每一个字段为0时表示,无事务)

          --U- 上界提交(表明这个事务已经提交,只是还没有清除一些标记)

         C---: 已提交并清除(所有标记已清除,比如相关的锁字节都被置0了)

 Lck:块中由该事务锁住的行数

Scn/Fsc:表示提交SCN或者快速提交SCN。

       在我们这个例子中,占用了一个事务槽,flag是--U-表明,事务已经快速提交,但是Lck为3,表明还没有清除锁标记,快速提交的scn是326fb8. Uba指向了最后一条插入的undo记录,这条undo记录会指向上一条插入的undo记录,上一条undo记录指向了上上条插入的undo记录。这样,如果事务失败,或者人工回滚,沿着这条undo链重做就好了。在oracle10g之后,一个数据块的事务槽被硬性规定为169个。(8KB大小的情况下)

 

3.3 并发操作

我们需要开启4个事务,如下所示:

 

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. session1: update t1 set n1=101  where id = 1;  
  2. session2: update t1 set n1=102 where id = 2;  
  3.                   commit;alter system checkpoint;  
  4. My session: set transaction read only;  
  5. session3: update t1 set n1=99 where id = 3; commitalter system checkpoint;  
  6. My session: select id, n1 from t1;  


我们在自己的会话查询之前,转储一下数据块的结果,不过转储之前执行一下切换检查点命令(alter system checkpoint;),使改变刷新输出到磁盘。

 

 

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. Itl           Xid                  Uba         Flag  Lck        Scn/Fsc  
  2. 0x01   0x0009.010.0000062d  0x00c00712.0127.07  --U-    1  fsc 0x0000.0034a241 --flag U 代表上界提交,意思是这个事务已经提交,只是目前标记还没清理。  
  3. 0x02   0x0005.018.0000062a  0x00c0068a.013f.2f  ----    1  fsc 0x0000.00000000 ----锁住的是id为1的行,为会话1所锁住的行  
  4.   
  5. bdba: 0x00416169  
  6. data_block_dump,data header at 0x1cd0825c  
  7. ===============  
  8. tsiz: 0x1fa0  
  9. hsiz: 0x18  
  10. pbl: 0x1cd0825c  
  11.      76543210  
  12. flag=--------  
  13. ntab=1  
  14. nrow=3  
  15. frre=-1  
  16. fsbo=0x18  
  17. fseo=0x1f71  
  18. avsp=0x1f6b  
  19. tosp=0x1f6b  
  20.   
  21. block_row_dump:  
  22. tab 0, row 0, @0x1f7b  
  23. tl: 10 fb: --H-FL-- lb: 0x2  cc: 2 -- 事务0x2似乎锁住了这一行,其实是锁住了这一行  
  24. col  0: [ 2]  c1 02  
  25. col  1: [ 3]  c2 02 02  
  26. tab 0, row 1, @0x1f71  
  27. tl: 10 fb: --H-FL-- lb: 0x0  cc: 2  
  28. col  0: [ 2]  c1 03  
  29. col  1: [ 3]  c2 02 03  
  30. tab 0, row 2, @0x1f85  
  31. tl: 9 fb: --H-FL-- lb: 0x1  cc: 2 -- 事务0x1似乎锁住了这一行,其实没有锁住,只是锁标记没有清除  
  32. col  0: [ 2]  c1 04  
  33. col  1: [ 2]  c1 64  
  34. end_of_block_dump  

 执行查询之后,转储数据块结果(需要先执行alter system checkpoint;)

 

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. Itl           Xid                  Uba         Flag  Lck        Scn/Fsc  
  2. 0x01   0x0009.010.0000062d  0x00c00712.0127.07  C---    0  scn 0x0000.0034a241 -- flag C 已提交并清除完成,表明,查询会将已提交的数据清除标记。  
  3. 0x02   0x0005.018.0000062a  0x00c0068a.013f.2f  ----    1  fsc 0x0000.00000000 --- 锁住的是id为1的行,为会话1所锁住的行  
  4. bdba: 0x00416169  
  5. data_block_dump,data header at 0x1cd0825c  
  6. ===============  
  7. tsiz: 0x1fa0  
  8. hsiz: 0x18  
  9. pbl: 0x1cd0825c  
  10.      76543210  
  11. flag=--------  
  12. ntab=1  
  13. nrow=3  
  14. frre=-1  
  15. fsbo=0x18  
  16. fseo=0x1f71  
  17. avsp=0x1f6b  
  18. tosp=0x1f6b  
  19.   
  20. block_row_dump:  
  21. tab 0, row 0, @0x1f7b  
  22. tl: 10 fb: --H-FL-- lb: 0x2  cc: 2 -- 事务0x2似乎锁住了这一行,其实是锁住了这一行。  
  23. col  0: [ 2]  c1 02  
  24. col  1: [ 3]  c2 02 02  
  25. tab 0, row 1, @0x1f71  
  26. tl: 10 fb: --H-FL-- lb: 0x0  cc: 2  
  27. col  0: [ 2]  c1 03  
  28. col  1: [ 3]  c2 02 03  
  29. tab 0, row 2, @0x1f85  
  30. tl: 9 fb: --H-FL-- lb: 0x0  cc: 2 --锁标记已经被清除了。  
  31. col  0: [ 2]  c1 04  
  32. col  1: [ 2]  c1 64  
  33. end_of_block_dump  

 

 

3.4 真实的查询操作

 

       我们知道,如果我们需要查询一个数据,假设我们是事务1,开始于1:00,于1:05分开始查找A表记录1号。另一个事务2于1:01开始,在1:05分之前将A表记录1号修改了3遍,比如最开始记录1号的值是1,另一个事务将其由1改成2,又改成了3,最后改成了4。另一个事务2于1:10提交的。这样我们的事务1查找的记录1号的值应该为1,但是数据块里面的值已经被修改好几遍了,而且已经变成了4。那么oracle是怎么找到原始值1的呢。下面让我们通过一个小例子来解释这种现象:

       其实,就是讲前面的步骤在执行一下,原谅我直接将上面的命令再拷贝一部分放在下面

3.4.1 准备工作

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. </pre><pre code_snippet_id="571760" snippet_file_name="blog_20150104_10_4627320" name="code" class="sql">execute dbms_random.seed(0)  
  2.   
  3. set doc off  
  4. doc  
  5.   
  6. end doc is marked with #  
  7.   
  8. #  
  9.   
  10. set linesize 120  
  11. set trimspool on  
  12. set pagesize 24  
  13. set arraysize 25  
  14.   
  15. -- set longchunksize 32768  
  16. -- set long 32768  
  17.   
  18. set autotrace off  
  19.   
  20. clear breaks  
  21. ttitle off  
  22. btitle off  
  23.   
  24. column owner format a15  
  25. column segment_name format a20  
  26. column table_name format a20  
  27. column index_name format a20  
  28. column object_name format a20  
  29. column subobject_name format a20  
  30. column partition_name format a20  
  31. column subpartition_name format a20  
  32. column column_name format a20  
  33. column column_expression format a40 word wrap  
  34. column constraint_name format a20  
  35.   
  36. column referenced_name format a30  
  37.   
  38. column file_name format a60  
  39.   
  40. column low_value format a24  
  41. column high_value format a24  
  42.   
  43. column parent_id_plus_exp   format 999  
  44. column id_plus_exp      format 990  
  45. column plan_plus_exp        format a90  
  46. column object_node_plus_exp format a14  
  47. column other_plus_exp       format a90  
  48. column other_tag_plus_exp   format a29  
  49.   
  50. column access_predicates    format a80  
  51. column filter_predicates    format a80  
  52. column projection       format a80  
  53. column remarks          format a80  
  54. column partition_start      format a12  
  55. column partition_stop       format a12  
  56. column partition_id     format 999  
  57. column other_tag        format a32  
  58. column object_alias     format a24  
  59.   
  60. column object_node      format a13  
  61. column  other           format a150  
  62.   
  63. column os_username      format a30  
  64. column terminal         format a24  
  65. column userhost         format a24  
  66. column client_id        format a24  
  67.   
  68. column statistic_name format a35  
  69.   
  70. column namespace format a20  
  71. column attribute format a20  
  72.   
  73. column hint format a40  
  74.   
  75. column start_time   format a25  
  76. column end_time     format a25  
  77.   
  78. column time_now noprint new_value m_timestamp  
  79.   
  80. set feedback off  
  81.   
  82. select to_char(sysdate,'hh24miss') time_now from dual;  
  83. commit;  
  84.   
  85. set feedback on  
  86.   
  87. set timing off  
  88. set verify off  
  89.   
  90. alter session set optimizer_mode = all_rows;  
  91.   
  92. spool log  
  93. -- 创建表  
  94. drop table t1;  
  95.   
  96. create table t1(id number, n1 number);  
  97.   
  98. insert into t1 values(1,1);  
  99. insert into t1 values(2,2);  
  100. insert into t1 values(3,3);  
  101.   
  102. commit;  
  103.   
  104. create unique index t1_i1 on t1(id);  
  105.   
  106. begin  
  107.     dbms_stats.gather_table_stats(  
  108.         ownname      => user,  
  109.         tabname      =>'T1',  
  110.         estimate_percent => 100,  
  111.         method_opt   => 'for all columns size 1'  
  112.     );  
  113. end;  
  114. /  
  115.   
  116. --  
  117. --<span style="white-space:pre">  </span>For 11g - force to disc for the dump  
  118. --  
  119.   
  120.   
  121. alter system checkpoint;  
  122. -- 创建一个存储过程,用来转储一个表使用的第一个数据块。  
  123. create or replace procedure dump_table_block(  
  124.     i_tab_name      in  varchar2,  
  125.     i_owner         in  varchar2    default sys_context('userenv','session_user')  
  126. )  
  127. as  
  128.     m_file_id   number;  
  129.     m_block     number;  
  130.     m_process   varchar2(32);  
  131.   
  132. begin  
  133.   
  134.     execute immediate  
  135.         ' select ' ||  
  136.             ' dbms_rowid.rowid_relative_fno(rowid), ' ||  
  137.             ' dbms_rowid.rowid_block_number(rowid)  ' ||  
  138.         ' from ' ||  
  139.             i_owner ||   
  140.             '.' ||  
  141.             i_tab_name ||  
  142.         ' where ' ||  
  143.             ' rownum = 1 '  
  144.         into  
  145.             m_file_id, m_block  
  146.     ;  
  147.   
  148.     execute immediate  
  149.         'alter system dump datafile ' || m_file_id ||  
  150.         ' block ' || m_block  
  151.     ;  
  152.   
  153. --  
  154. --  For non-MTS, work out the trace file name  
  155. --  
  156.   
  157.     select  
  158.         spid  
  159.     into  
  160.         m_process  
  161.     from  
  162.         v$session   se,  
  163.         v$process   pr  
  164.     where  
  165. --  
  166. --      The first option is the 9.2 version for checking the SID  
  167. --      The second is a quick and dirty option for 8.1.7  
  168. --      provided SYS has made v$mystat visible (or this is the sys account)  
  169. --  
  170. --      se.sid = (select dbms_support.mysid from dual)  
  171.         se.sid = (select sid from v$mystat where rownum = 1)  
  172.     and pr.addr = se.paddr  
  173.     ;  
  174.   
  175.     dbms_output.new_line;  
  176.     dbms_output.put_line('Trace file name includes: ' || m_process);  
  177.     dbms_output.new_line;  
  178.   
  179. exception  
  180.     when others then  
  181.         dbms_output.new_line;  
  182.         dbms_output.put_line('Unspecified error.');  
  183.         dbms_output.put_line('Check syntax.');  
  184.         dbms_output.put_line('dump_table_block({table_name},[{owner}]');  
  185.         dbms_output.new_line;  
  186.         raise;  
  187. end;  
  188. .  
  189. /  
  190.   
  191. show errors  
  192.   
  193. drop public synonym dump_table_block;  
  194. create public synonym dump_table_block for dump_table_block;  
  195. grant execute on dump_table_block to public;  

 

 

创建一个转储undo块的存储过程

 

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. create or replace procedure dump_undo_block  
  2. as  
  3.     m_xidusn        number;  
  4.     m_header_file_id    number;  
  5.     m_header_block_id   number;  
  6.     m_start_file_id     number;  
  7.     m_start_block_id    number;  
  8.     m_file_id       number;  
  9.     m_block_id      number;  
  10.     m_process       number;  
  11. begin  
  12.   
  13.     select  
  14.         xidusn,  
  15.         start_ubafil,  
  16.         start_ubablk,  
  17.         ubafil,   
  18.         ubablk  
  19.     into  
  20.         m_xidusn,  
  21.         m_start_file_id,  
  22.         m_start_block_id,  
  23.         m_file_id,  
  24.         m_block_id  
  25.     from  
  26.         v$session   ses,  
  27.         v$transaction   trx  
  28.     where  
  29.         ses.sid = (select mys.sid from V$mystat mys where rownum = 1)  
  30.     and trx.ses_addr = ses.saddr  
  31.     ;  
  32.   
  33.     select   
  34.         file_id, block_id   
  35.     into  
  36.         m_header_file_id,  
  37.         m_header_block_id  
  38.     from   
  39.         dba_rollback_segs   
  40.     where   
  41.         segment_id = m_xidusn  
  42.     ;  
  43.   
  44.   
  45.     dbms_output.put_line('Header  File: ' || m_header_file_id || ' Header block: '  || m_header_block_id);  
  46.     dbms_output.put_line('Start   File: ' || m_start_file_id  || ' Start block: '   || m_start_block_id);  
  47.     dbms_output.put_line('Current File: ' || m_file_id        || ' Current block: ' || m_block_id);  
  48.   
  49.   
  50.     dbms_system.ksdwrt(1,'===================');  
  51.     dbms_system.ksdwrt(1,'Undo Segment Header');  
  52.     dbms_system.ksdwrt(1,'===================');  
  53.   
  54.     execute immediate  
  55.         'alter system dump datafile ' || m_header_file_id ||' block ' || m_header_block_id;  
  56.   
  57.     dbms_system.ksdwrt(1,'================');  
  58.     dbms_system.ksdwrt(1,'Undo Start block');  
  59.     dbms_system.ksdwrt(1,'================');  
  60.   
  61.     execute immediate  
  62.         'alter system dump datafile ' || m_start_file_id ||' block ' || m_start_block_id;  
  63.   
  64.     if m_start_block_id != m_block_id then  
  65.   
  66.         dbms_system.ksdwrt(1,'==================');  
  67.         dbms_system.ksdwrt(1,'Current Undo block');  
  68.         dbms_system.ksdwrt(1,'==================');  
  69.   
  70.         execute immediate  
  71.             'alter system dump datafile ' || m_file_id ||' block ' || m_block_id;  
  72.   
  73.     end if;  
  74.   
  75.     select  
  76.         spid  
  77.     into  
  78.         m_process  
  79.     from  
  80.         v$session   se,  
  81.         v$process   pr  
  82.     where   se.sid = (select sid from v$mystat where rownum = 1)  
  83.     and  
  84.         pr.addr = se.paddr  
  85.     ;  
  86.   
  87.     dbms_output.put_line('Trace file name includes: ' || m_process);  
  88.   
  89. end;  
  90. /  
  91.   
  92. grant execute on dump_undo_block to public;  
  93.   
  94. drop   public synonym dump_undo_block;   
  95. create public synonym dump_undo_block for dump_undo_block;  


        

 

以上步骤只是创建了一个表t1,

       3.4.2 转储表t1的第一个数据块

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. execute dump_table_block('t1')  

 

        3.4.3 另外开启一个会话,将id为1的记录n1的值改为101,然后改为102,然后改为103。并记录块的变化和undo块的变化。

 

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. select * from t1;--清除标记    
  2. alter system checkpoint;--刷新输出磁盘,执行完等5,6s  
  3. execute dump_table_block('t1')--转储数据块  <span style="color:#ff0000;">序号1</span>  
  4. update t1 set n1=101 where id=1;--第一次更新  
  5. alter system checkpoint;--刷新输出磁盘,执行完等5,6s  
  6. execute dump_table_block('t1')--转储数据块  
  7. execute dump_undo_block--转储undo块  <span style="color:#ff0000;">序号2</span>  
  8. update t1 set n1=102 where id=1;--第二次更新  
  9. alter system checkpoint;--刷新输出磁盘,执行完等5,6s  
  10. execute dump_table_block('t1')--转储数据块  
  11. execute dump_undo_block--转储undo块  <span style="color:#ff0000;">序号3</span>  
  12. update t1 set n1=103 where id=1;--第三次更新  
  13. alter system checkpoint;--刷新输出磁盘,执行完等5,6s  
  14. execute dump_table_block('t1')--转储数据块  
  15. execute dump_undo_block--转储undo块  <span style="color:#ff0000;">序号4</span>  

 

       3.4.4 找到转储出来的日志文件

       序号1 执行完后

 

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. Itl           Xid                  Uba         Flag  Lck        Scn/Fsc  
  2. 0x01   0x0003.015.0000065c  0x00c009af.01e8.1c  --U-    3  fsc 0x0000.0035e07c --理论上,这里的标记应该被清除了  
  3. 0x02   0x0000.000.00000000  0x00000000.0000.00  ----    0  fsc 0x0000.00000000  
  4. bdba: 0x00416169  
  5. data_block_dump,data header at 0x1ce9705c  

    标记没有清掉,不知道为什么

序号2 执行完后
数据块转储结果

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. *** 2015-01-04 22:52:48.506  
  2. Start dump data blocks tsn: 0 file#:1 minblk 90473 maxblk 90473  
  3. Block dump from cache:  
  4. Dump of buffer cache at level 4 for tsn=0, rdba=4284777  
  5.   
  6. Itl           Xid                  Uba         Flag  Lck        Scn/Fsc  
  7. 0x01   0x0003.015.0000065c  0x00c009af.01e8.1c  C---    0  scn 0x0000.0035e07c --标记被清除了  
  8. 0x02   0x0004.00b.00000595  0x00c02694.0109.1d  ----    1  fsc 0x0000.00000000 --锁住了修改的行  
  9. bdba: 0x00416169  
  10. data_block_dump,data header at 0x1ce9705c  

undo块转储结果

 

 

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. *** 2015-01-04 22:53:40.834  
  2. ===================  
  3. Undo Segment Header  
  4. ===================  
  5. Start dump data blocks tsn: 2 file#:3 minblk 176 maxblk 176  
  6. Block dump from cache:  
  7. Dump of buffer cache at level 4 for tsn=2, rdba=12583088  
  8. .....  
  9. TRN TBL::  
  10.    
  11.   index  state cflags  wrap#    uel         scn            dba            parent-xid    nub     stmt_num    cmt  
  12.   ------------------------------------------------------------------------------------------------  
  13.    0x00    9    0x00  0x0593  0x000c  0x0000.0035df6c  0x00c02693  0x0000.000.00000000  0x00000002   0x00000000  1420382305  
  14.    0x01    9    0x00  0x056d  0x001e  0x0000.0035dcd1  0x00c02692  0x0000.000.00000000  0x00000001   0x00000000  1420381360  
  15.    0x02    9    0x00  0x0591  0x0005  0x0000.0035de9e  0x00c02692  0x0000.000.00000000  0x00000001   0x00000000  1420381960  
  16.    0x03    9    0x00  0x0594  0x0018  0x0000.0035e16f  0x00c02694  0x0000.000.00000000  0x00000001   0x00000000  1420382905  
  17.    0x04    9    0x00  0x0594  0x001f  0x0000.0035e189  0x00c02694  0x0000.000.00000000  0x00000001   0x00000000  1420382905  
  18.    0x05    9    0x00  0x0594  0x0009  0x0000.0035deed  0x00c02692  0x0000.000.00000000  0x00000001   0x00000000  1420382080  
  19.    0x06    9    0x00  0x0594  0x0019  0x0000.0035e080  0x00c02694  0x0000.000.00000000  0x00000001   0x00000000  1420382629  
  20.    0x07    9    0x00  0x0593  0x0002  0x0000.0035de5e  0x00c02692  0x0000.000.00000000  0x00000001   0x00000000  1420381815  
  21.    0x08    9    0x00  0x0594  0x000a  0x0000.0035e089  0x00c02693  0x0000.000.00000000  0x00000001   0x00000000  1420382629  
  22.    0x09    9    0x00  0x0592  0x001d  0x0000.0035df03  0x00c02692  0x0000.000.00000000  0x00000001   0x00000000  1420382080  
  23.    0x0a    9    0x00  0x0593  0x0011  0x0000.0035e0b8  0x00c02694  0x0000.000.00000000  0x00000001   0x00000000  1420382639  
  24.    0x0b   10    0x80  0x0595  0x0003  0x0000.00000000  0x00c02694  0x0000.000.00000000  0x00000001   0x00000000  0 <span style="color:#ff0000;">--跟数据块的事务槽对上了</span>  
  25.    0x0c    9    0x00  0x0594  0x001c  0x0000.0035dfad  0x00c02693  0x0000.000.00000000  0x00000001   0x00000000  1420382440  
  26.    0x0d    9    0x00  0x0592  0x0014  0x0000.0035ddac  0x00c02692  0x0000.000.00000000  0x00000001   0x00000000  1420381705  
  27.  .....  
  28. *-----------------------------  
  29. * Rec #0x1d  slt: 0x0b  objn: 77560(0x00012ef8)  objd: 77560  tblspc: 0(0x00000000)  
  30. *       Layer:  11 (Row)   opc: 1   rci 0x00     
  31. Undo type:  Regular undo    Begin trans    Last buffer split:  No   
  32. Temp Object:  No   
  33. Tablespace Undo:  No   
  34. rdba: 0x00000000Ext idx: 0  
  35. flg2: 0  
  36. *-----------------------------  
  37. uba: 0x00c02694.0109.1c ctl max scn: 0x0000.0035dc32 prv tx scn: 0x0000.0035dc72  
  38. txn start scn: scn: 0x0000.0035e1d6 logon user: 0  
  39.  prev brb: 12592785 prev bcl: 0  
  40. KDO undo record:  
  41. KTB Redo   
  42. op: 0x03  ver: 0x01    
  43. compat bit: 4 (post-11) padding: 0  
  44. op: Z  
  45. KDO Op code: URP row dependencies Disabled  
  46.   xtype: XA flags: 0x00000000  bdba: 0x00416169  hdba: 0x00416168  
  47. itli: 2  ispac: 0  maxfr: 4863  
  48. tabn: 0 slot: 0(0x0) flag: 0x2c lock: 0 ckix: 0  
  49. ncol: 2 nnew: 1 size: -1  
  50. col  1: [ 2]  c1 02<span style="color:#ff0000;">-- 这是数据块事务槽uba的地址指向的undo记录,c1 02 代表着1,说明修改前是1.</span>  

 

 

序号3执行完后

数据块转储结果

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. *** 2015-01-04 23:06:25.105  
  2. Block dump from cache:  
  3. Dump of buffer cache at level 4 for tsn=0, rdba=4284777  
  4. .....  
  5. Itl           Xid                  Uba         Flag  Lck        Scn/Fsc  
  6. 0x01   0x0003.015.0000065c  0x00c009af.01e8.1c  C---    0  scn 0x0000.0035e07c  
  7. 0x02   0x0004.00b.00000595  0x00c02694.0109.1e  ----    1  fsc 0x0000.00000000  --uba 变了,由 0x00c02694.0109.1d 变成了  0x00c02694.0109.1e  
  8. </span>bdba: 0x00416169  
  9. data_block_dump,data header at 0x1ce9705c  
  10. .....  
  11. block_row_dump:  
  12. tab 0, row 0, @0x1f7b  
  13. tl: 10 fb: --H-FL-- lb: 0x2  cc: 2  
  14. col  0: [ 2]  c1 02  
  15. col  1: [ 3]  c2 02 03  
  16. tab 0, row 1, @0x1f8e  
  17. tl: 9 fb: --H-FL-- lb: 0x0  cc: 2  
  18. col  0: [ 2]  c1 03  
  19. col  1: [ 2]  c1 03  
  20. tab 0, row 2, @0x1f85  
  21. tl: 9 fb: --H-FL-- lb: 0x0  cc: 2  
  22. col  0: [ 2]  c1 04  
  23. col  1: [ 2]  c1 04  
  24. end_of_block_dump  

undo块转储结果

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. *** 2015-01-04 23:06:31.347  
  2. ===================  
  3. Undo Segment Header  
  4. ===================  
  5. Start dump data blocks tsn: 2 file#:3 minblk 176 maxblk 176  
  6. Block dump from cache:  
  7. Dump of buffer cache at level 4 for tsn=2, rdba=12583088  
  8. ....  
  9.   
  10.   index  state cflags  wrap#    uel         scn            dba            parent-xid    nub     stmt_num    cmt  
  11.   ------------------------------------------------------------------------------------------------  
  12.    0x00    9    0x00  0x0593  0x000c  0x0000.0035df6c  0x00c02693  0x0000.000.00000000  0x00000002   0x00000000  1420382305  
  13.    0x01    9    0x00  0x056d  0x001e  0x0000.0035dcd1  0x00c02692  0x0000.000.00000000  0x00000001   0x00000000  1420381360  
  14.    0x02    9    0x00  0x0591  0x0005  0x0000.0035de9e  0x00c02692  0x0000.000.00000000  0x00000001   0x00000000  1420381960  
  15.    0x03    9    0x00  0x0594  0x0018  0x0000.0035e16f  0x00c02694  0x0000.000.00000000  0x00000001   0x00000000  1420382905  
  16.    0x04    9    0x00  0x0594  0x001f  0x0000.0035e189  0x00c02694  0x0000.000.00000000  0x00000001   0x00000000  1420382905  
  17.    0x05    9    0x00  0x0594  0x0009  0x0000.0035deed  0x00c02692  0x0000.000.00000000  0x00000001   0x00000000  1420382080  
  18.    0x06    9    0x00  0x0594  0x0019  0x0000.0035e080  0x00c02694  0x0000.000.00000000  0x00000001   0x00000000  1420382629  
  19.    0x07    9    0x00  0x0593  0x0002  0x0000.0035de5e  0x00c02692  0x0000.000.00000000  0x00000001   0x00000000  1420381815  
  20.    0x08    9    0x00  0x0594  0x000a  0x0000.0035e089  0x00c02693  0x0000.000.00000000  0x00000001   0x00000000  1420382629  
  21.    0x09    9    0x00  0x0592  0x001d  0x0000.0035df03  0x00c02692  0x0000.000.00000000  0x00000001   0x00000000  1420382080  
  22.    0x0a    9    0x00  0x0593  0x0011  0x0000.0035e0b8  0x00c02694  0x0000.000.00000000  0x00000001   0x00000000  1420382639  
  23.    0x0b   10    0x80  0x0595  0x0003  0x0000.00000000  0x00c02694  0x0000.000.00000000  0x00000001   0x00000000  0  
  24.    0x0c    9    0x00  0x0594  0x001c  0x0000.0035dfad  0x00c02693  0x0000.000.00000000  0x00000001   0x00000000  1420382440  
  25.    0x0d    9    0x00  0x0592  0x0014  0x0000.0035ddac  0x00c02692  0x0000.000.00000000  0x00000001   0x00000000  1420381705  
  26.  .......  
  27. *-----------------------------  
  28. * Rec #0x1d  slt: 0x0b  objn: 77560(0x00012ef8)  objd: 77560  tblspc: 0(0x00000000)  
  29. *       Layer:  11 (Row)   opc: 1   rci 0x00     
  30. Undo type:  Regular undo    Begin trans    Last buffer split:  No   
  31. Temp Object:  No   
  32. Tablespace Undo:  No   
  33. rdba: 0x00000000Ext idx: 0  
  34. flg2: 0  
  35. *-----------------------------  
  36. uba: 0x00c02694.0109.1c ctl max scn: 0x0000.0035dc32 prv tx scn: 0x0000.0035dc72  
  37. txn start scn: scn: 0x0000.0035e1d6 logon user: 0  
  38.  prev brb: 12592785 prev bcl: 0  
  39. KDO undo record:  
  40. KTB Redo   
  41. op: 0x03  ver: 0x01    
  42. compat bit: 4 (post-11) padding: 0  
  43. op: Z  
  44. KDO Op code: URP row dependencies Disabled  
  45.   xtype: XA flags: 0x00000000  bdba: 0x00416169  hdba: 0x00416168  
  46. itli: 2  ispac: 0  maxfr: 4863  
  47. tabn: 0 slot: 0(0x0) flag: 0x2c lock: 0 ckix: 0  
  48. ncol: 2 nnew: 1 size: -1  
  49. col  1: [ 2]  c1 02   
  50.    
  51. *-----------------------------  
  52. * Rec #0x1e  slt: 0x0b  objn: 77560(0x00012ef8)  objd: 77560  tblspc: 0(0x00000000)  
  53. *       Layer:  11 (Row)   opc: 1   rci 0x1d     
  54. Undo type:  Regular undo   Last buffer split:  No   
  55. Temp Object:  No   
  56. Tablespace Undo:  No   
  57. rdba: 0x00000000  
  58. *-----------------------------  
  59. KDO undo record:  
  60. KTB Redo   
  61. op: 0x02  ver: 0x01    
  62. compat bit: 4 (post-11) padding: 0  
  63. op: C  uba: 0x00c02694.0109.1d --指向前一个undo记录  
  64. KDO Op code: URP row dependencies Disabled  
  65.   xtype: XAxtype KDO_KDOM2 flags: 0x00000080  bdba: 0x00416169  hdba: 0x00416168  
  66. itli: 2  ispac: 0  maxfr: 4863  
  67. tabn: 0 slot: 0(0x0) flag: 0x2c lock: 2 ckix: 0  
  68. ncol: 2 nnew: 1 size: 0  
  69. Vector content:   
  70. col  1: [ 3]  c2 02 02 -- 这是数据块事务槽uba的地址指向的undo记录,c2 02 02 代表着101,说明修改前是101  

 

序号4执行完后

数据块转储结果

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. *** 2015-01-04 23:13:22.306  
  2. Start dump data blocks tsn: 0 file#:1 minblk 90473 maxblk 90473  
  3. Block dump from cache:  
  4. Dump of buffer cache at level 4 for tsn=0, rdba=4284777  
  5. ....  
  6.  Itl           Xid                  Uba         Flag  Lck        Scn/Fsc  
  7. 0x01   0x0003.015.0000065c  0x00c009af.01e8.1c  C---    0  scn 0x0000.0035e07c  
  8. 0x02   0x0004.00b.00000595  0x00c02694.0109.1f  ----    1  fsc 0x0000.00000000 --uba 变了,由 0x00c02694.0109.1e 变成了  0x00c02694.0109.1f  
  9. bdba: 0x00416169  
  10. ....  
  11. block_row_dump:  
  12. tab 0, row 0, @0x1f7b  
  13. tl: 10 fb: --H-FL-- lb: 0x2  cc: 2  
  14. col  0: [ 2]  c1 02  
  15. col  1: [ 3]  c2 02 04  
  16. tab 0, row 1, @0x1f8e  
  17. tl: 9 fb: --H-FL-- lb: 0x0  cc: 2  
  18. col  0: [ 2]  c1 03  
  19. col  1: [ 2]  c1 03  
  20. tab 0, row 2, @0x1f85  
  21. tl: 9 fb: --H-FL-- lb: 0x0  cc: 2  
  22. col  0: [ 2]  c1 04  
  23. col  1: [ 2]  c1 04  
  24. end_of_block_dump  

undo块转储结果

 

[sql] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. *** 2015-01-04 23:13:31.622  
  2. ===================  
  3. Undo Segment Header  
  4. ===================  
  5. Start dump data blocks tsn: 2 file#:3 minblk 176 maxblk 176  
  6. Block dump from cache:  
  7. Dump of buffer cache at level 4 for tsn=2, rdba=12583088  
  8. ....  
  9.  index  state cflags  wrap#    uel         scn            dba            parent-xid    nub     stmt_num    cmt  
  10.   ------------------------------------------------------------------------------------------------  
  11.    0x00    9    0x00  0x0593  0x000c  0x0000.0035df6c  0x00c02693  0x0000.000.00000000  0x00000002   0x00000000  1420382305  
  12.    0x01    9    0x00  0x056d  0x001e  0x0000.0035dcd1  0x00c02692  0x0000.000.00000000  0x00000001   0x00000000  1420381360  
  13.    0x02    9    0x00  0x0591  0x0005  0x0000.0035de9e  0x00c02692  0x0000.000.00000000  0x00000001   0x00000000  1420381960  
  14.    0x03    9    0x00  0x0594  0x0018  0x0000.0035e16f  0x00c02694  0x0000.000.00000000  0x00000001   0x00000000  1420382905  
  15.    0x04    9    0x00  0x0594  0x001f  0x0000.0035e189  0x00c02694  0x0000.000.00000000  0x00000001   0x00000000  1420382905  
  16.    0x05    9    0x00  0x0594  0x0009  0x0000.0035deed  0x00c02692  0x0000.000.00000000  0x00000001   0x00000000  1420382080  
  17.    0x06    9    0x00  0x0594  0x0019  0x0000.0035e080  0x00c02694  0x0000.000.00000000  0x00000001   0x00000000  1420382629  
  18.    0x07    9    0x00  0x0593  0x0002  0x0000.0035de5e  0x00c02692  0x0000.000.00000000  0x00000001   0x00000000  1420381815  
  19.    0x08    9    0x00  0x0594  0x000a  0x0000.0035e089  0x00c02693  0x0000.000.00000000  0x00000001   0x00000000  1420382629  
  20.    0x09    9    0x00  0x0592  0x001d  0x0000.0035df03  0x00c02692  0x0000.000.00000000  0x00000001   0x00000000  1420382080  
  21.    0x0a    9    0x00  0x0593  0x0011  0x0000.0035e0b8  0x00c02694  0x0000.000.00000000  0x00000001   0x00000000  1420382639  
  22.    0x0b   10    0x80  0x0595  0x0003  0x0000.00000000  0x00c02694  0x0000.000.00000000  0x00000001   0x00000000  0  
  23.    0x0c    9    0x00  0x0594  0x001c  0x0000.0035dfad  0x00c02693  0x0000.000.00000000  0x00000001   0x00000000  1420382440  
  24.    0x0d    9    0x00  0x0592  0x0014  0x0000.0035ddac  0x00c02692  0x0000.000.00000000  0x00000001   0x00000000  1420381705  
  25. .....  
  26. *-----------------------------  
  27. * Rec #0x1d  slt: 0x0b  objn: 77560(0x00012ef8)  objd: 77560  tblspc: 0(0x00000000)  
  28. *       Layer:  11 (Row)   opc: 1   rci 0x00     
  29. Undo type:  Regular undo    Begin trans    Last buffer split:  No   
  30. Temp Object:  No   
  31. Tablespace Undo:  No   
  32. rdba: 0x00000000Ext idx: 0  
  33. flg2: 0  
  34. *-----------------------------  
  35. uba: 0x00c02694.0109.1c ctl max scn: 0x0000.0035dc32 prv tx scn: 0x0000.0035dc72  
  36. txn start scn: scn: 0x0000.0035e1d6 logon user: 0  
  37.  prev brb: 12592785 prev bcl: 0  
  38. KDO undo record:  
  39. KTB Redo   
  40. op: 0x03  ver: 0x01    
  41. compat bit: 4 (post-11) padding: 0  
  42. op: Z  
  43. KDO Op code: URP row dependencies Disabled  
  44.   xtype: XA flags: 0x00000000  bdba: 0x00416169  hdba: 0x00416168  
  45. itli: 2  ispac: 0  maxfr: 4863  
  46. tabn: 0 slot: 0(0x0) flag: 0x2c lock: 0 ckix: 0  
  47. ncol: 2 nnew: 1 size: -1  
  48. col  1: [ 2]  c1 02  
  49.    
  50. *-----------------------------  
  51. * Rec #0x1e  slt: 0x0b  objn: 77560(0x00012ef8)  objd: 77560  tblspc: 0(0x00000000)  
  52. *       Layer:  11 (Row)   opc: 1   rci 0x1d     
  53. Undo type:  Regular undo   Last buffer split:  No   
  54. Temp Object:  No   
  55. Tablespace Undo:  No   
  56. rdba: 0x00000000  
  57. *-----------------------------  
  58. KDO undo record:  
  59. KTB Redo   
  60. op: 0x02  ver: 0x01    
  61. compat bit: 4 (post-11) padding: 0  
  62. op: C  uba: 0x00c02694.0109.1d--指向前一个undo记录  
  63. KDO Op code: URP row dependencies Disabled  
  64.   xtype: XAxtype KDO_KDOM2 flags: 0x00000080  bdba: 0x00416169  hdba: 0x00416168  
  65. itli: 2  ispac: 0  maxfr: 4863  
  66. tabn: 0 slot: 0(0x0) flag: 0x2c lock: 2 ckix: 0  
  67. ncol: 2 nnew: 1 size: 0  
  68. Vector content:   
  69. col  1: [ 3]  c2 02 02  
  70.    
  71. *-----------------------------  
  72. * Rec #0x1f  slt: 0x0b  objn: 77560(0x00012ef8)  objd: 77560  tblspc: 0(0x00000000)  
  73. *       Layer:  11 (Row)   opc: 1   rci 0x1e     
  74. Undo type:  Regular undo   Last buffer split:  No   
  75. Temp Object:  No   
  76. Tablespace Undo:  No   
  77. rdba: 0x00000000  
  78. *-----------------------------  
  79. KDO undo record:  
  80. KTB Redo   
  81. op: 0x02  ver: 0x01    
  82. compat bit: 4 (post-11) padding: 0  
  83. op: C  uba: 0x00c02694.0109.1e --指向前一个undo记录  
  84. </span>KDO Op code: URP row dependencies Disabled  
  85.   xtype: XAxtype KDO_KDOM2 flags: 0x00000080  bdba: 0x00416169  hdba: 0x00416168  
  86. itli: 2  ispac: 0  maxfr: 4863  
  87. tabn: 0 slot: 0(0x0) flag: 0x2c lock: 2 ckix: 0  
  88. ncol: 2 nnew: 1 size: 0  
  89. Vector content:   
  90. col  1: [ 3]  c2 02 03 -- 这是数据块事务槽uba的地址指向的undo记录,c2 02 03代表着102,说明修改前是102.  
0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics