Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

dbms_scheduler job finihed succesfull when underlying procedure fails

user4260036Feb 4 2012 — edited Feb 5 2012
I have a job created with dbms_scheduler which finishes succesfully even when the underlying plsql procedure raises a oracle error.
Is there any way to stop the running job with a failure when the plsql procedure fails and show the oracle error in the all_scheduler_job_run_details.error# column?

Example:

procedure test is
begin raise no_data_found;
end;

dbms_scheduler.create_job(job_name =>'MY_JOB', 'test');

dbms_scheduler.run_job;

when querying all_scheduler_job_run_details I want to see the no_data_found error which occurs in procedure.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 4 2012
Added on Feb 4 2012
21 comments
3,587 views