pl / sql中的文件操作无效

时间:2015-07-02 08:03:45

标签: oracle file plsql plsqldeveloper

我正在学习PL / SQL而且我一直收到这个错误,因为#34;文件操作无效,因为#34; 代码如下:

SET SERVEROUTPUT on;
CREATE or replace directory DESKTOP as 'C:\Users\Gadre\Desktop';
declare
v1 varchar2(32767);
f1 utl_file.file_type;
begin
f1 :=utl_file.fopen('DESKTOP','test.docx','r');
dbms_output.put_line('HELLO WORLD');
end;

错误是:

Error report:
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation
ORA-06512: at line 5
29283. 00000 -  "invalid file operation"
*Cause:    An attempt was made to read from a file or directory that does
       not exist, or file or directory access was denied by the
       operating system.
*Action:   Verify file and directory access privileges on the file system,
       and if reading, verify that the file exists.

文件确实存在。另外,我通过管理员访问,所以我认为我确实有权限。

0 个答案:

没有答案