Select A.sid, b.serial#, decode(A.Type,
'MR',
'Media Recovery',
'RT',
'Redo Thread',
'UN',
'User Name',
'TX',
'Transaction',
'TM',
'DML',
'UL',
'PL/SQL User Lock',
'DX',
'Distributed Xaction',
'CF',
'Control File',
'IS',
'Instance State',
'FS',
'File Set',
'IR',
'Instance Recovery',
'ST',
'Disk Space Transaction',
'TS',
'Temp Segment',
'IV',
'Library Cache Invalida-tion',
'LS',
'Log Start or Switch',
'RW',
'Row Wait',
'SQ',
'Sequence Number',
'TE',
'Extend Table',
'TT',
'Temp Table',
'Unknown') LockType, c.object_name,
---b.username,
---b.osuser,
decode(a.lmode,
0,
'None',
1,
'Null',
2,
'Row-S',
3,
'Row-X',
4,
'Share',
5,
'S/Row-X',
6,
'Exclusive',
'Unknown') LockMode, B.MACHINE, D.SPID
From v$lock a, v$session b, all_objects c, V$PROCESS D
Where a.sid = b.sid And a.Type In ('TM', 'TX') And c.object_id = a.id1 And
B.PADDR = D.ADDR
阅读(1100) | 评论(0) | 转发(0) |