SELECT l.sid, l.start_time, l.username, l.elapsed_seconds
a.sql_text, a.elapsed_time
FROM v$session_longops l, v$sqlarea a
WHERE a.elapsed = l. elapsed_seconds
AND l.elapsed_seconds > 1
a.sql_text, a.elapsed_time
FROM v$session_longops l, v$sqlarea a
WHERE a.elapsed = l. elapsed_seconds
AND l.elapsed_seconds > 1
2 comments:
There is some mistake in the script. Please find the below corrected one.
SELECT l.sid, l.start_time, l.username, l.elapsed_seconds,
a.sql_text, a.elapsed_time
FROM v$session_longops l, v$sqlarea a
WHERE a.elapsed_time = l.elapsed_seconds
AND l.elapsed_seconds > 1;
Check this to find long running session in oracle. Very detailed information.
https://orahow.com/find-long-running-queries-in-oracle/
Post a Comment