Skip to Main Content

Oracle Database Express Edition (XE)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

UTL_FILE.FOPEN returns ORA-29283 non-existent file or path on Windows 11

Keith KirtonOct 25 2024

I need to be able to read and write CSV files on my local desktop PC (WIndows 11 Pro). The software I wrote was working under Oracle XE 18c on my old PC before it recently underwent a tragic electronic death. That machine ran WIndows 10 Pro.

I finished building my new desktop this week and installed Windows 11 Pro and Oracle XE 21c.

I have one pluggable database: XEPDB1.

I created user ‘MINIMLS3’ and granted some privs. Next I logged into SYSTEM user and ran:

> ALTER SESSION SET CONTAINER = XEPDB1;
Session altered.
> CREATE OR REPLACE DIRECTORY MINIMLS3_FILES AS 'D:\MiniMLS3\';
Directory MINIMLS3_FILES created.
> GRANT READ,WRITE ON DIRECTORY MINIMLS3_FILES TO MINIMLS3;
Grant succeeded.

Then I logged into MINIMLS3 user and ran the following:

DECLARE
  mywritefile UTL_FILE.file_type;
BEGIN
  mywritefile := UTL_FILE.FOPEN('MINIMLS3_FILES', 'RawRESI.csv', 'W', 32767);
  UTL_FILE.FCLOSE(mywritefile);
EXCEPTION
  WHEN OTHERS THEN
    dbms_output.put_line('ERROR: ' || SQLCODE || ' - ' || SQLERRM);
    raise;
END;
/

I verified that MINIMLS3 user can see the directory MINIMLS3_FILES and has read, write privileges.

I verified that the folder D:\MiniMLS3 does grant full permissions to ORA_INSTALL.

I also tried the directory path with and without the final backslash “\”.

Still I keep getting the nonexistent file or path error:

Attempting to open write file.

DECLARE
*
ERROR at line 1:
ORA-29283: invalid file operation: nonexistent file or path [29434]
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-06512: at "SYS.UTL_FILE", line 41
ORA-06512: at "SYS.UTL_FILE", line 478
ORA-06512: at line 6
Comments
Post Details
Added on Oct 25 2024
1 comment
3,100 views