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;
/