OWNER SYS
DIRECTORY_NAME ME
DIRECTORY_PATH \\172.16.20.11\Mad\
begin
vSFile := utl_file.fopen('ME','20170405.csv','R');
IF utl_file.is_open(vSFile) THEN
LOOP
我得到錯誤:PLSQL CSV文件讀取和寫入
ORA-29283: invalid file operation ORA-06512: at "SYS.UTL_FILE", line 536 ORA-29283: invalid file operation ORA-06512: at "MADHUR.MSP_UPD_DAILYSALESFRMSAP", line 28 ORA-06512: at line 1
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.
這是什麼問題?你是否完成了錯誤信息所說的內容? – Aleksej
Oracle是否真的允許(識別)爲[服務器文件系統上的目錄]在Windows的網絡路徑(http://docs.oracle.com/database/121/CNCPT/glossary.htm#CNCPT44466)?你可以將該路徑映射到一個驅動器盤符並查看它是否有效? (也可能是與操作系統權限或Oracle授權的,當然問題...) –