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!

issue writing to directory on different drive in XE 21c Windows

Jeff ChircoJun 13 2022

We are experienceing an issue with Oracle 21c XE for Windows where we are unable to write to a file that is on a different drive than where Oracle XE is installed. We get the following error:

ORA-29283: invalid file operation: nonexistent file or path [29434]

For example XE is installed on C:\ I can write to that but I can not write to my D:\ drive.
I have found this other thread (here) that is for 21c on Windows and it was suggested to open an SR. That topic is 10 months old and no update if a SR or bug was filed and I can not find anything on Oracle Support related to this issue. Anyone come across this issue?
Here is my code to replicate the issue

alter session set container=XEPDB1;

CREATE OR REPLACE DIRECTORY DIR_C AS 'c:\temp';
CREATE OR REPLACE DIRECTORY DIR_D AS 'd:\temp';

--Writing to C where Oracle XE is installed
DECLARE
  f utl_file.file_type;
begin
  f := utl_file.fopen ('DIR_C', 'test.txt', 'w');
  utl_file.put_line(f, to_char(sysdate, 'YYYY.MM.HH24.MI.SS'));
  utl_file.fclose(f);
end;
/

--Write to another drive
DECLARE
  f utl_file.file_type;
begin
  f := utl_file.fopen ('DIR_D', 'test.txt', 'w');
  utl_file.put_line(f, to_char(sysdate, 'YYYY.MM.HH24.MI.SS'));
  utl_file.fclose(f);
end;
/

First one runs without error. Second statement fails with

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 4```
Comments
Post Details
Added on Jun 13 2022
7 comments
1,402 views