My Oracle Support Banner

ORA-36786: File dir_name/file_name does not Exist or Cannot be Accessed Using an Alias Directory Defined Over a Network Drive (Doc ID 466308.1)

Last updated on AUGUST 18, 2020

Applies to:

Oracle OLAP - Version 10.1.0.2 and later
z*OBSOLETE: Microsoft Windows 2000
z*OBSOLETE: Microsoft Windows Server 2003
z*OBSOLETE: Microsoft Windows XP

Symptoms

NOTE: In the images and/or the document content below, the user information and environment data used represents fictitious data from the Oracle sample or bulit-in schema(s), Public Documentation delivered with an Oracle database product or other training material.  Any similarity to actual environments, actual persons, living or dead, is purely coincidental and not intended in any manner.

Trying to read or write files to a directory alias defined over a network directory fails with
error:
ORA-36786: File TEST/TEST.LOG does not exist or cannot be accessed.

ORA-06512: at "SYS.DBMS_AW", line 93
ORA-06512: at "SYS.DBMS_AW", line 122
ORA-06512: at line 1


The same operations using an alias defined over a local directory can be successfully completed.

Steps to reproduce:
===================
- In another server (my_pc1) create a directory (MY_TEST) and share it with Full Control for Everyone (at O.S. level).
- In this server (my_pc2), where OLAP is running, go to Windows Explorer and map the MY_TEST directory to z drive.
- Test an make sure that you can create a file on that Z: drive using notepad.
- Then test writing to that directory in OLAP:
SQL> create directory TEST as 'z:\';

Directory created.

SQL> grant all on directory TEST to PUBLIC;

Grant succeeded.

SQL> exec dbms_aw.execute('cda TEST');
The current directory is TEST.

PL/SQL procedure successfully completed.

SQL> exec dbms_aw.execute('otf ''test.log''');
BEGIN dbms_aw.execute('otf ''test.log'''); END;

*
ERROR at line 1:
ORA-36786: File TEST/TEST.LOG does not exist or cannot be accessed.
ORA-06512: at "SYS.DBMS_AW", line 93
ORA-06512: at "SYS.DBMS_AW", line 122
ORA-06512: at line 1

The same error appears if directory is defined as:

SQL> create directory TEST as '\\my_pc1\MY_TEST';


.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.