oracle(二)V$lock 视图中ID1 , ID2 列的含义


1.在Table Locks(TM)中 ID1为对象的id, ID2为0 
在Row Locks(TX)中 ID1为Undo Segmen Number与该事务在该回滚段的事务表(Transaction table)中所占用的槽号(slot number)。

ID2为以十进制数值表示环绕(wrap)次数,即该槽(slot)被重用的次数;

2的16次方等于65536

ID1=9x65536+10  = 589834  

2.ID1转换成 xidusn,xidslot

trunc截断取整,bitand按位与

原文地址:https://www.cnblogs.com/yuyutianxia/p/3324382.html