Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: get the sql producing lock
On Mon, 20 Mar 2006 20:15:29 +0100, Sybrand Bakker
<postbus_at_sybrandb.demon.nl> wrote:
>On Mon, 20 Mar 2006 12:34:52 -0500, NetComrade
><netcomradeNSPAM_at_bookexchange.net> wrote:
>
>>I am not aware of 'current transaction sql'.
>
>
>You could find that by linking v$session.taddr to
>v$transaction.address
Yes.. I thought my scripts looked elsewhere.. too bad there isn't a way to associate 'all' sql belonging to a transaction with xidusn.
the following script might be useful for OP.
select username||'@'||machine||'('||osuser||'|'||program||')' username, s.sid||','||s.serial# sidc,rn.name,
t.xidslot slot,t.xidsqn sqn,t.used_ublk, s.sql_hash_value
sqlhash,t.used_urec, (sysdate- to_date(t.start_time,'mm/dd/yy
hh24:mi:ss
'))*24*60*60 secs
from v$transaction t ,v$session s ,v$rollname rn where t.addr = s.taddr