Re: Transactions that are active for a long time

Re: Transactions that are active for a long time

 

  

-- to crack down the long ops

COLUMN sid FORMAT 999
COLUMN serial# FORMAT 9999999
COLUMN machine FORMAT A30
COLUMN progress_pct FORMAT 99999999.00
COLUMN elapsed FORMAT A10
COLUMN remaining FORMAT A10

SELECT s.sid,
s.serial#,
s.machine,
ROUND(sl.elapsed_seconds/60) || ':' || MOD(sl.elapsed_seconds,60)
elapsed,
ROUND(sl.time_remaining/60) || ':' || MOD(sl.time_remaining,60)
remaining,
ROUND(sl.sofar/sl.totalwork*100, 2) progress_pct
FROM v$session s,
v$session_longops sl
WHERE s.sid = sl.sid
AND s.serial# = sl.serial#;

----- Original Message -----
From: <Michael.[Email Address Removed] "LazyDBA.com Discussion" <[Email Address Removed] Wednesday, March 31, 2004 2:00 PM
Subject: Transactions that are active for a long time


> It will be wonderful to be able to find out all transactions that run
> for more than 30 minutes.
> Tried to put something together but could not convert a varchar2 field
> to a date to make the
> appropriate comparisons
>
> If you have implemented something in these lines before or have any ideas
> to help out
> that will be greatly appreciated
>
>
> Mike
Oracle LazyDBA home page