declare file_handle UTL_FILE.FILE_TYPE; begin file_handle := UTL_FILE.FOPEN('/tmp', '文件名', 'w'); UTL_FILE.FCLOSE(file_handle); exception WHEN utl_file.invalid_path THEN raise_application_error(-20000, 'ERROR: Invalid path for file or path not in INIT.ORA.'); end;
在数据库中创目录,用它看能不能访问。我没做过这些。
file_handle UTL_FILE.FILE_TYPE;
begin
file_handle := UTL_FILE.FOPEN('/tmp', '文件名', 'w');
UTL_FILE.FCLOSE(file_handle);
exception
WHEN utl_file.invalid_path THEN
raise_application_error(-20000, 'ERROR: Invalid path for file or path not in INIT.ORA.');
end;