Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: UTL_FILE
Zephyr wrote:
> Hi,
>
> I want to write from a procedure into a file on the server using UTL_FILE
> and do not have a parameter
> UTL_FILE_DIR= in my init.ora specifiing a path. The server version is
> 9.2.0.4 and as far as I know,
> I do not need UTL_FILE_DIR with this version. I'am using 'create
> directory...' instead.
>
> This is my code for writing in a file on a windows machine
>
> p_FileDir varchar2 (50) := 'C:\';
> --p_FileDir varchar2 (50) := '\\elseserver\results';
> p_FileName varchar2 (20) := 'user.txt';
>
> v_FileHandle := UTL_FILE.FOPEN (p_FileDir, p_FileName, 'w');
> UTL_FILE.PUT_LINE (v_FileHandle, v_text);
>
> I tried several volumes, folders, notations and UNC notation, but always get
>
> ORA-29280: invalid directory path
>
> Has anyone a hint, or do I need the UTL_FILE_DIR parameter set on the
> oracle server?
>
>
> Thanx
> Patrick
>
>
Hi Patrick,
here's a couple of (blatent) hints on setting up UTL_FILE. Enjoy.
http://www.jlcomp.demon.co.uk/faq/utl_file.html http://www.jlcomp.demon.co.uk/faq/utlfiledebug.html
I suspect the first one above will probably explain your problem(s).
Cheers,
Norm.
Received on Tue Feb 15 2005 - 07:23:02 CST