Showing posts with label Refresh. Show all posts
Showing posts with label Refresh. Show all posts

Friday, March 14, 2014

Steps To Fix The Broken Jobs

Reason. Oracle might have failed to execute the job successfully after a continuous attempts.

Steps:

1). First find out the Broken Jobs of the database.

select JOB,LAST_DATE,NEXT_DATE,INTERVAL,BROKEN,WHAT from dba_jobs;

       JOB LAST_DATE NEXT_DATE INTERVAL                                 B WHAT
---------- --------- --------- ---------------------------------------- - ----------------------------------------------------------------------
       000 10-MAR-13 12-MAR-13 sysdate+5/1440                           N dbms_refresh.refresh('"xyz"."ALL_xyz_SNAPSHOTS"');
       001 10-MAR-13 12-MAR-13 sysdate+5/1440                           N dbms_refresh.refresh('"xyz"."ALL_xyz_SNAPSHOTS_2"');



2). Mark the Job as not Broken so that execute the Job Again.


exec dbms_job.broken(JOB#,FALSE);

3). Now Run the job.

exec dbms_job.run(JOB#);


References.

http://psoug.org/reference/dbms_job.html