Sunday, September 12, 2010

How to check long running transactions?

set lines 132 pages 200

column Started_Date format a20
column Program format a20
column Sid format 99999
column Username format a10
column sql_text format a55 wrap

select distinct * from (select to_date(t.START_DATE,'DD.MM.YYYY HH24:MI:SS') Started_Date , s.sid, s.username,nvl(s.program,s.module) Program,sq.sql_text from v$transaction t, v$session s, v$sql sq where t.addr = s.taddr and s.sql_address = sq.address and t.start_date < (sysdate-4/24) order by 1);

No comments:

Post a Comment