Oracle 10g UTIL_FILE ora-292283

I am trying to read a file from inside sqlplus.

The server that tha data-base is on is \\xx1-oracledev
and the server that has the files i want to read is on \\xx1-util01\

From windows I can get to the directroy and open the file. but I get a ORA-29283 error when my code tries ot execute the util_file.fopen command.

I need some help


the oracle 10g database in on a Windows 2003 server

-- create the directory
CREATE DIRECTORY TEST01 AS '\\xx1-util01\IT-DEV$\Deployment\Dev\ProductMasterUpload\';

-- check its there
select * from all_directories;
SYS | TEST01 | \\xx1-util01\IT-DEV$\Deployment\Dev\ProductMasterUpload\

-- try to read a file from that directory

declare
f utl_file.file_type;
s varchar2(4000);
begin
f := utl_file.fopen('TEST01','TEST.TXT','R');
LOOP
BEGIN
  UTL_FILE.GET_LINE(f,s);
  DBMS_OUTPUT.PUT_LINE(s);
  EXCEPTION
  WHEN NO_DATA_FOUND THEN EXIT ;
  WHEN OTHERS THEN
    EXIT ;
  END;
END LOOP;
utl_file.fclose(f);
END;
LVL 2
Jayesh AcharyaTechnichal ConsultantAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
slightwv (䄆 Netminder)Connect With a Mentor Commented:
Oracle has issues with UNC and networked filesystems on Windows.

It has to do with SYSTEM that runs Oracle.  On mobile right now and cannot provide the links on the issue but you should be able to find some with some quick searches.
0
 
ajexpertCommented:
Did you provide READ grants ?

GRANT read, ON DIRECTORY TEST01 TO <user>;

Here is link that can help

http://www.orafaq.com/forum/t/42445/2/

0
 
Jayesh AcharyaTechnichal ConsultantAuthor Commented:
Thanks, that saved a lot of time going down some dead ends.
0
All Courses

From novice to tech pro — start learning today.