##### Gather stats job running since long time ###
SELECT * FROM v$session_longops WHERE opname LIKE '%Gather%' AND time_remaining != 0 ORDER BY SID;
select sid, opname, target, sofar, totalwork,
units, to_char(start_time,'HH24:MI:SS') StartTime,
time_remaining, message, username
from v$session_longops
where sofar != totalwork
order by start_time
/
set lines 200
col OPNAME for a25
Select a.sid,a.serial#,b.status,a.opname,
to_char(a.START_TIME,' dd-Mon-YYYY HH24:mi:ss') START_TIME,
to_char(a.LAST_UPDATE_TIME,' dd-Mon-YYYY HH24:mi:ss') LAST_UPDATE_TIME,
a.time_remaining as "Time Remaining Sec" ,
a.time_remaining/60 as "Time Remaining Min",
a.time_remaining/60/60 as "Time Remaining HR"
From v$session_longops a, v$session b
where a.sid = b.sid
and a.sid =&sid
And time_remaining > 0;
https://www.support.dbagenesis.com/post/scheduling-jobs-with-dbms_scheduler
https://www.support.dbagenesis.com/post/gather-statistics-in-oracle
No comments:
Post a Comment