Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

UTL_FILE: Invalid Path Exception

45 views
Skip to first unread message

Gerald Gruber

unread,
Nov 6, 2001, 2:10:10 AM11/6/01
to
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


Thomas Kyte

unread,
Nov 6, 2001, 8:50:25 AM11/6/01
to
In article <9s82cj$liq$1...@newsreader1.netway.at>, "Gerald says...


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 (tk...@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

MarkyG

unread,
Nov 7, 2001, 4:24:54 AM11/7/01
to
Tom Kytes suggestions seem the more likely.
Also, bear in mind that UTL_FILE is a server side file utility and not
client side so the c:\temp has to exist on the server machine that
Oracle is sitting on.

M

"Gerald Gruber" <g...@trench.at> wrote in message news:<9s82cj$liq$1...@newsreader1.netway.at>...

0 new messages