Created
January 21, 2014 10:20
-
-
Save joseporiol/8537577 to your computer and use it in GitHub Desktop.
Long query progress on database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT a.sid, | |
a.serial#, | |
b.username, | |
opname OPERATION, | |
target OBJECT, | |
TRUNC (elapsed_seconds, 5) "ET (s)", | |
TO_CHAR (start_time, 'HH24:MI:SS') start_time, | |
ROUND ( (sofar / totalwork) * 100, 2) "COMPLETE (%)" | |
FROM v$session_longops a, v$session b | |
WHERE a.sid = b.sid | |
AND b.username NOT IN ('SYS', 'SYSTEM') | |
AND totalwork > 0 | |
ORDER BY elapsed_seconds; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment