Last active
July 22, 2019 15:14
-
-
Save den-kozlov/26f5d5b0e1297e460c81d27c9020ce47 to your computer and use it in GitHub Desktop.
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 s.inst_id, | |
SQL.SQL_TEXT as "OPERATION", | |
to_char(START_TIME, 'dd/mm/yyyy hh24:mi:ss') Start_Time, | |
to_char(LAST_UPDATE_TIME, 'dd/mm/yyyy hh24:mi:ss') Last_Update_Time, | |
round(TIME_REMAINING/60,1) as "MINUTES_REMAINING", | |
round((SOFAR/TOTALWORK) * 100,2) as PCT_DONE | |
from gv$session s, | |
gv$sqlarea sql, | |
gv$session_longops op | |
where | |
s.sid=op.sid | |
and s.sql_id = sql.sql_id | |
and s.sid = op.sid | |
and s.status = 'ACTIVE' | |
and op.totalwork > op.sofar | |
and s.sid not in (select distinct sid from gv$mystat where rownum < 2) | |
order by 4 desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment