Thursday, December 20, 2007

Resolve hanging mview refresh job (UNIX)

The above steps must be followed in order to resolve a hanging mview refresh job.

select * from dba_jobs_runing in order to find the job number(JOB_ID) and the sid (SID)
of the hanging job.

exec dbms_job.broken(JOB_ID,TRUE); in order to broke the job

select a.spid, b.sid, b.username
from v$process a, v$session b
where a.addr = b.paddr and sid=SID;
in order to find the process id (SPID)

On the O/S kill the process: kill -9 SPID

And after that run the job .

dbms_job.run(JOB_ID);

Same process is working on windows too , except the concept how to kill the process on windows.

No comments:

Post a Comment