Skip to Main Content

Database Software

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 : AUTO_DROP

user637544Jan 7 2010 — edited Jan 22 2010
I know very little about DBMS_SCHEDULER but want to learn how to use it. Basically I want to run a shell script from PL/SQL block immediately (no scheduling). I have written the following job for it.

BEGIN
DBMS_SCHEDULER.create_job (
job_name => 'test',
job_type => 'EXECUTABLE',
job_action => '/rootuser/test.ksh',
enabled => FALSE,
auto_drop => TRUE,
comments => 'Job defined entirely by the CREATE JOB procedure.');
END;

I am running it using:

BEGIN
DBMS_SCHEDULER.run_job(job_name => 'test');
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(SQLERRM);
END;

I want to know a few things:

- if job test.ksh exits with a non-zero return code does the control goes to EXCEPTION block?
- if job test.ksh exits with a non-zero return code does the job gets dropped?
This post has been answered by Rnr-Oracle on Jan 7 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 19 2010
Added on Jan 7 2010
8 comments
9,779 views