Re: UTL_FILE: Invalid Path Exception

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 6 Nov 2001 05:50:25 -0800
Message-ID: <9s8pr101br5_at_drn.newsguy.com>


In article <9s82cj$liq$1_at_newsreader1.netway.at>, "Gerald says...
>
>Hi,
>I started working on Oracle and PL/SQL some weeks ago. Now I try to work
>with OS-Files using the UTL_FILE-Package. But I have a problem to open the
>data source. I always get the "Invalid Path" exception and I donīt know why?
>
>I run the programm from SQL*Plus on a Windows2000 Server.
>
>Here is the simple program:
>
>DECLARE
> v_kanal utl_file.file_type;
> v_puffer varchar2(255);
>
>BEGIN
> v_kanal := utl_file.fopen('c:\temp','eingabe.dat','r');
> LOOP
> BEGIN
> utl_file.get_line(v_kanal,v_puffer);
> dbms_output.put_line(v_puffer);
> EXCEPTION
> when no_data_found then exit;
> END;
> END LOOP;
> utl_file.fclose(v_kanal);
> EXCEPTION
> when utl_file.invalid_path
> then dbms_output.put_line('Invalid Pfad'); -- progam always ends here!
> when utl_file.invalid_operation
> then dbms_output.put_line('Invalid Operation');
>
>END;
>
>And this is my INITgru.ORA File:
>
>utl_file_dir = *
>IFILE='C:\Oracle\admin\gru\pfile\init.ora'
>
>Thanx for any help
>
>Gerald
>
>

did you restart after adding that?

did you do "show parameter utl_file_dir" to see whats actually set?

does the ifile have a utl_file_dir setting that is OVERRIDING what you set?

If you did restart, start with show parameter to see whats set. If its different then *, look in your ifile and see that its overriding yours.

Put your parameters into one file to avoid confusion

--
Thomas Kyte (tkyte_at_us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Tue Nov 06 2001 - 14:50:25 CET

Original text of this message