Skip to Main Content

Oracle Database Discussions

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 - Trying to create and run a UNIX shell script from Oracle

705974Nov 11 2009 — edited Nov 11 2009
How can I execute Unix Shell Script from Oracle using DBMS_SCHEDULER?

After reading through numerous examples online, I completed the 3 steps below -
Create Program, Create Job, Run Job. On my 3rd step, I get the following error.
How can I verify that the job was created?

ORA-27475: "APPS.POSPAY_FILE_CHECK_JOB" must be a job

1) Create Program
BEGIN
  dbms_scheduler.create_program(
	program_name => 'POSPAY_FILE_CHECK_PROG',
	program_type => 'EXECUTABLE',
	program_action => '/home/ldcgroup/ldccbc/POSPAY_USC2_CHECK.sh',
	number_of_arguments => 0,
	enabled => TRUE,
	comments => 'Test Program'
	);
END;
2) Create Job
BEGIN
DBMS_SCHEDULER.CREATE_JOB (
   job_name          =>  'POSPAY_CHECK_FILE_JOB',
   program_name      =>  'POSPAY_CHECK_FILE_PROG',
   enabled           =>   TRUE);
END;
/
3) Run the Job (no schedule, I will run this from an EBS Concurrent Request)
BEGIN
   DBMS_SCHEDULER.run_job (
	job_name => 'POSPAY_FILE_CHECK_JOB');
END;
/
This post has been answered by Dom Brooks on Nov 11 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 9 2009
Added on Nov 11 2009
9 comments
1,067 views