Discussions
Categories
- 196.8K All Categories
- 2.2K Data
- 238 Big Data Appliance
- 1.9K Data Science
- 450.2K Databases
- 221.7K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 550 MySQL Community Space
- 478 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 544 SQLcl
- 4K SQL Developer Data Modeler
- 187K SQL & PL/SQL
- 21.3K SQL Developer
- 295.8K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.5K Development Tools
- 107 DevOps
- 3.1K QA/Testing
- 646K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 154 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 18 Java Essentials
- 160 Java 8 Questions
- 86K Java Programming
- 80 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 437 LiveLabs
- 38 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 171 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 232 Portuguese
issue writing to directory on different drive in XE 21c Windows

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```
Answers
-
Hello,
Did the D:\TEMP directory exist before you last restarted the XE instance?
Does the Oracle operating system user have permissions to write to the D:\TEMP directory?
Does d:\temp exist?
Did you try re-creating the Oracle directory object as 'D:\TEMP' rather than 'd:\temp'?
Regards,
Frank
-
Yes D:\TEMP existed after I restarted the XE instance and yes it has OS permission to that folder. I've tried both upper and lower case in the directory object, no luck.
-
Hello,
Thats odd.
Try creating a dummy tablespace in d:\temp, something like
CREATE TABLESPACE dummy1 DATAFILE 'd:\temp\dummy01.dbf' size 10m;
What kind of errors does that show?
Regards,
Frank
-
The tablespace was created successfully.
C:\ORACLEXE\PRODUCT\21C\ORADATA\XE\XEPDB1\SYSTEM01.DBF C:\ORACLEXE\PRODUCT\21C\ORADATA\XE\XEPDB1\SYSAUX01.DBF C:\ORACLEXE\PRODUCT\21C\ORADATA\XE\XEPDB1\UNDOTBS01.DBF C:\ORACLEXE\PRODUCT\21C\ORADATA\XE\XEPDB1\USERS01.DBF D:\TEMP\DUMMY01.DBF
-
Hello,
So the database can see the D:\TEMP directory.
try
- GRANT READ, WRITE ON DIRECTORY DIR_D TO <username_runing_the_script>;
- run the script
- stop and start the listener
- run the script
Does that get you any further?
How does the D:\ drive differ from the C:\ drive?
Is the D:\ a share?
Regards,
Frank
-
Hi Frank. I am running this script as SYS so shouldn't be a need to grant directory privileges. I did however stop and start the listener but no changes.
The D drive is just another physical hard drive on my computer, nothing special.