我如何chmod
从PL/SQL块运行命令?
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;
资源