Sometimes this estimation might not be accurate. The elapsed_seconds might change to zero or a few seconds frequently for some long running jobs. That means the job is progressing and it is not hang.
prompt ====================================================
prompt == Start of check_longops.sql
prompt ====================================================
prompt ====================================================
prompt == Check Long Operation notes
prompt == These are just Estimations and sometimes not accurate.
prompt ==
prompt ==
prompt ====================================================
SET PAGES 100
SET LINE 200
COLUMN sid FORMAT 999
COLUMN serial# FORMAT 9999999
COLUMN machine FORMAT A20
COLUMN progress_pct FORMAT 99999999.00
COLUMN elapsed FORMAT A10
COLUMN remaining FORMAT A10
COLUMN message FORMAT a80
COLUMN opname FORMAT a20
column username format a20
SELECT s.sid,
sl.username,
opname,
MESSAGE,
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,
DECODE (totalwork, 0, 0, ROUND (sl.sofar / sl.totalwork * 100, 2))
progress_pct
FROM gv$session s, gv$session_longops sl
WHERE s.sid = sl.sid AND s.serial# = sl.serial# AND sofar <> totalwork;
prompt ====================================================
prompt == End of check_longops.sql
prompt ====================================================
No comments:
Post a Comment