SQL> select t3.program,t2.sid,t2.ID1,t2.ctime
from
(select sid, type, id1, id2, lmode, request, ctime
from v$lock
where sid in (select sid
from v$lock
where TYPE = 'TX'
and LMODE = 6)
and type='TM') t2,
v$session t3
where t2.sid = t3.sid; 2 3 4 5 6 7 8 9 10 11
PROGRAM SID ID1 CTIME
------------------------------------------------ ---------- ---------- ----------
sqlplus@june (TNS V1-V3) 1 75517 6713
sqlplus@june (TNS V1-V3) 38 75206 1584
-------------------------------------------------------------------------------------
SQL> select t3.program,t1.sid,t1.ID1,t1.ctime
from v$lock t1,(select sid
from v$lock
where TYPE = 'TX'
and LMODE = 6
group by sid) t2,v$session t3
where
t1.sid = t3.sid
and t2.sid=t1.sid
and t1.type='TM';
2 3 4 5 6 7 8 9 10
PROGRAM SID ID1 CTIME
------------------------------------------------ ---------- ---------- ----------
sqlplus@june (TNS V1-V3) 1 75517 6718
sqlplus@june (TNS V1-V3) 38 75206 1589