如何从PL / SQL块运行chmod
命令?
答案 0 :(得分:6)
dbms_scheduler方式:
begin
dbms_scheduler.create_job (
job_name => 'ext_tasks_job',
job_type => 'executable',
job_action => '/bin/sh',
number_of_arguments => 2,
auto_drop => true);
dbms_scheduler.set_job_argument_value ('ext_tasks_job', 1, '-c');
dbms_scheduler.set_job_argument_value ('ext_tasks_job', 2, 'chmod 777 /somedir/some.file');
dbms_scheduler.run_job ('ext_tasks_job');
end;