Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: UTL_FILE

Re: UTL_FILE

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Tue, 15 Feb 2005 22:01:12 +0000
Message-ID: <p1s411hpmtpkb5a4hcbg9pfr99mus2td4f@4ax.com>


On Tue, 15 Feb 2005 16:03:58 +0100, "Zephyr" <p.neumann_at_ids-scheer.de> wrote:

>this solves my problem, but I can't write in UNC notation pathes
>even if the oracle user has write access to the UNC share.
>
>I always get
>
>ORA-29283: invalid file operation
>
>Is it possible to write in UNC pathes?

 Yep.

$ sqlplus test/test

SQL*Plus: Release 9.2.0.5.0 - Production on Tue Feb 15 21:56:25 2005

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production With the Partitioning, OLAP and Data Mining options

SQL> create or replace directory FOO as '//server/andyh/';

Directory created.

SQL> declare
  2 fHandle_ utl_file.file_type;
  3 begin

  4      fHandle_ := utl_file.fopen('FOO', 'foo_test.txt', 'w');
  5      utl_file.put_line(fHandle_, 'Foo write test');
  6      utl_file.fclose(fHandle_);

  7 end;
  8 /

PL/SQL procedure successfully completed.

SQL> host cat //server/andyh/foo_test.txt Foo write test

 Running sqlplus under cygwin on Windows, hence the Unix-ish cat working on a UNC path - but obviously Oracle isn't running under Cygwin so it doesn't affect the proof that Oracle can access UNC paths.

 To get it to work, changed the service to log on as my user which has access to that share, instead of LocalSystem.

-- 
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Received on Tue Feb 15 2005 - 16:01:12 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US