使用文件操作是需要捕获异常的,在你的语句end;前加上 exception when utl_file.invalid_path then dbms_output.put_line('path error'); when others then dbms_output.put_line('others'); 即可,我已帮你试了!过程正确建立!
db_link 不需要特殊用户创建该作业
你的第二个问题其实是出在没有进行异常捕获! 在你的第6行和第7行之间加入 exception when utl_file.invalid_path then dbms_output.put_line('error!'); when others then dbms_output.put_line('error!'); 即可!你的第一个问题,一般都是由于首先身份证明引起!
设置utl_file_dir的要点:
1。 utl_file_dir=* 这表示你能操作任何目录,尽量不要用
2。 utl_file_dir=d:\ 这表示你能操作d:\目录下的文件,但你不能操作d:\目录下的子目录
3。注意在设置
utl_file_dir=路径时,如果路径是长路径名,例如c:\my temp目录,则你必须加上'',例如:
utl_file_dir='c:\my temp'
4。utl_file_dir可以是多个路径
utl_file_dir=c:\,d:\,d:\temp,'c:\my temp'
5。设置完必须重新启动数据库
exception
when utl_file.invalid_path then
dbms_output.put_line('path error');
when others then
dbms_output.put_line('others');
即可,我已帮你试了!过程正确建立!
在你的第6行和第7行之间加入
exception
when utl_file.invalid_path then dbms_output.put_line('error!');
when others then dbms_output.put_line('error!');
即可!你的第一个问题,一般都是由于首先身份证明引起!