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.create_job and create_program to execute shell program

736688Nov 24 2009 — edited Nov 24 2009
dbms_scheduler.create_job and create_program to execute shell program in unix from PL/SQL

I guess the problem might be a shell program. 'send_file_susin.sh' I made executes CFT program which is to transfer files. While I tried to this problem, I heard that I should use dbms_scheduler.create_program and create_job to execute shell command. Therefore,

I made
dbms_scheduler.create_program(
program_name => 'SEND_FILE_SUSIN',
program_type => 'EXECUTABLE',
program_action => '/fsoracle/app/oracle/inst2/if_cft/send_file_susin.sh',
number_of_arguments => 0,
enabled => TRUE,
comments => 'TestProgram'
);
commit;
in a package, and then I execute the package.
program, and job

exec DBMS_SCHEDULER.CREATE_JOB (
job_name=>'run_sh1',
program_name=>'send_file_susin',
start_date=>sysdate + 1/2880,
repeat_interval=>null,
end_date=>null,
job_class=>'DEFAULT_JOB_CLASS',
enabled=>true
)

When I executed, I would check out there was send_file_susin program and job in sched.programs and sched.job classes. The job would be executed about 30 secs later.
After 30 secs, I saw the job was executed, but I couldn't see the log of CFT program. That means the file weren't transferred..

I don't know what's wrong with it... Plz, does anybody solve this?
Thanks a lot in advance.
This post has been answered by Rnr-Oracle on Nov 24 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 22 2009
Added on Nov 24 2009
2 comments
768 views