Hi,
I am using the below code in a procedure to call a shell script. But i am getting error as ora-27486: insufficient privileges.
When i check the session previliges it is having all the grants including forcreate job and create external jobs, creating procedures, functions.
Could please help me out as to what is wrong.
begin
DBMS_SCHEDULER.create_job (
job_name => 'file_transfer',
job_action => '/home/download/test.sh',
number_of_arguments => 2,
job_type => 'executable',
--start_date => SYSDATE,
--repeat_interval => 'FREQ=SECONDLY; INTERVAL=1',
enabled => FALSE,
auto_drop => FALSE,
comments => 'CREATE_PROGRAM test using a schell script'
);
DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE (
job_name => 'file_transfer',
argument_position => 1,
argument_value => 'V_D_FILENAME1'
);
DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE (
job_name => 'file_transfer',
argument_position => 2,
argument_value => 'V_D_FILENAME2');
DBMS_SCHEDULER.enable ('file_transfer');
exception when others then
raise_application_error(-21000, 'error in job'||sqlcode||sqlerrm);
dbms_output.put_line(sqlcode||sqlerrm);
end;
Edited by: user11942774 on Sep 18, 2012 12:51 AM