In the Oracle V$lock view, below is a description of the specific meanings of the Type,id1,id2 three columns:
Type has tm,tx two types, TX is row-level lock, Thing lock, TM Lock is table-level lock
TYPE |
ID1 |
ID2 |
Tm |
identifier of the modified table (object_id) |
0 |
TX |
A decimal value indicates the number of the rollback segment that is occupied by the transaction and the slot number that is used in the transaction table (Transactiontable) of the rollback segment (slotnumbers, which can be understood as record numbers). Its constituent form is: 0xRRRRSSSS (RRRR = RBS number, SSSS = slot). |
Represents the number of surround (wrap) occurrences in decimal values, the number of times that the slot (slot) is reused; |
When type is TM, 6718 is the object ID number
Sql> Select Type,id1,id2 from V$lock where Sid in (16,17);
TYPE ID1 ID2
---- ---------- ----------
TX 65572 56
TM 6718 0
TM 6718 0
TX 65572 56
Sql> Select object_id from dba_objects WHERE wner= ' SYS ' and object_name= ' TEST ';
object_id
----------
6718
Sql>
When type is TX, 65572 uses the following conversion method to get the thing slot number of the rollback segment number and the rollback segment
Sql> select Xidusn,xidslot from V$transaction;
Xidusn Xidslot
---------- ----------
1 36
Sql> Select Trunc (65572/65536), mod (65572,65536) from dual;
TRUNC (65572/65536) MOD (65572,65536)
------------------ ----------------
1 36
http://blog.itpub.net/7199859/viewspace-544923/
The meaning of the ORACLE v$lock view Type,id1,id2 value