undo transaction slot被覆盖引起ORA(5)

NAME                                                                  VALUE

---------------------------------------------------------------- ----------

commit cleanouts                                                          0

commit cleanouts successfully completed                                  0

redo KB read for transport                                                0

file io wait time                                                    27395

gc cr blocks served                                                      0

transaction tables consistent reads - undo records applied                0

transaction tables consistent read rollbacks                              0

cleanouts only - consistent read gets                                    0

cleanouts and rollbacks - consistent read gets                            0

immediate (CR) block cleanout applications                                0

deferred (CURRENT) block cleanout applications                            0

/////////////

//session 1:

/////////////

commit; 

alter system flush buffer_cache;

alter system dump datafile 4 block 1779;

--摘录data block dump结果中Itl有关的部分,事务使用0x02槽位,xid、uba与undo header 0x1e事务槽中的值匹配,这里很明显这里发生了delayed block clean out

Itl          Xid                  Uba        Flag  Lck        Scn/Fsc

0x01  0x0002.000.000011d2  0x02000010.187e.18  C---    0  scn 0x0000.00ae9241

0x02  0x0002.01e.000011d2  0x02000010.187e.19  ----    1  fsc 0x0002.00000000

0x03  0x0002.017.00001139  0x02000011.1788.1f  C---    0  scn 0x0000.00adb1b6

/////////////

//session 3:

/////////////

##db_block_size=8k的情况下,undo segment中有34个slot,执行下面的存储过程完成340次的update,平均每个slot将被覆盖10次

@proc1.sql

##执行后输出历次所使用的xid,uba信息

--第1轮覆盖

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :1  2,31,4563,8,20,27,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :2  2,2,4565,8,20,28,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :3  2,22,4564,8,20,29,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :4  2,15,4563,8,20,30,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :5  2,3,4567,8,20,31,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :6  2,7,4566,8,20,32,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :7  2,13,4565,8,20,33,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :8  2,0,4565,8,20,34,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :9  2,19,4561,8,20,35,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :10  2,28,4564,8,20,36,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :11  2,29,4565,8,20,37,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :12  2,4,4561,8,20,38,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :13  2,6,4566,8,20,39,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :14  2,25,4566,8,20,40,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :15  2,16,4567,8,20,41,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :16  2,11,4564,8,20,42,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :17  2,23,4565,8,20,43,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :18  2,33,4564,8,20,44,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :19  2,1,4563,8,20,45,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :20  2,26,4565,8,20,46,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :21  2,24,4564,8,20,47,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :22  2,17,4568,8,16,26,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :23  2,8,4567,8,16,27,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :24  2,20,4565,8,16,28,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :25  2,21,4565,8,16,29,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :26  2,32,4566,8,16,30,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :27  2,12,4562,8,16,31,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :28  2,27,4567,8,16,32,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :29  2,5,4564,8,16,33,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :30  2,14,4565,8,16,34,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :31  2,30,4563,8,16,35,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :32  2,9,4566,8,16,36,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :33  2,10,4567,8,21,1,6270

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :34  2,18,4564,8,21,2,6270

。。。。省略了部分

--第10轮覆盖

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :307  2,31,4572,8,14,3,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :308  2,2,4574,8,14,4,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :309  2,22,4573,8,14,5,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :310  2,15,4572,8,14,6,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :311  2,3,4576,8,14,7,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :312  2,7,4575,8,14,8,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :313  2,13,4574,8,14,9,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :314  2,0,4574,8,14,10,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :315  2,19,4570,8,14,11,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :316  2,28,4573,8,14,12,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :317  2,29,4574,8,14,13,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :318  2,4,4570,8,14,14,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :319  2,6,4575,8,14,15,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :320  2,25,4575,8,14,16,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :321  2,16,4576,8,14,17,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :322  2,11,4573,8,14,18,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :323  2,23,4574,8,14,19,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :324  2,33,4573,8,14,20,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :325  2,1,4572,8,14,21,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :326  2,26,4574,8,14,22,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :327  2,24,4573,8,14,23,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :328  2,17,4577,8,14,24,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :329  2,8,4576,8,14,25,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :330  2,20,4574,8,14,26,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :331  2,21,4574,8,14,27,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :332  2,32,4575,8,14,28,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :333  2,12,4571,8,14,29,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :334  2,27,4576,8,14,30,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :335  2,5,4573,8,14,31,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :336  2,14,4574,8,14,32,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :337  2,30,4572,8,14,33,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :338  2,9,4575,8,14,34,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :339  2,10,4576,8,15,1,6271

XIDUSN,XIDSLOT,XIDSQN,UBAFIL,UBABLK,UBAREC,UBASQN  :340  2,18,4573,8,15,2,6271

alter system flush buffer_cache;

alter system dump undo header "_SYSSMU2$";

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/31adee041cbfddebdb0c76723168ed2c.html