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

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

Re: UTL_FILE

From: <mzawadzki_at_starnet.lenfest.com>
Date: 1998/04/01
Message-ID: <6fu29t$jei$4@news1.fast.net>#1/1

Add exception handlers for the other possible exceptions from UTL_FILE (such as INVALID_MODE, WRITE_ERROR, etc.). It is not a INVALID_PATH exception, since you are catching that, and that means your UTL_FILE_DIR setting is most likely correct. I suspect Unix permissions. Remember that it is the owner of the oracle processes ('oracle') that does the file ops, not the uid of the client (sqlplus, etc.) session !

ajayraina_at_hotmail.com wrote:

>I have written the following Oracle PL/SQL procedure to create a small file.
 

>create or replace procedure ajfile as
> the_file utl_file.file_type;
>BEGIN
> the_file := utl_file.fopen('/proj/hedging','venk.txt','W');
> utl_file.put_line(the_file,'Hello world');
> utl_file.fclose(the_file);
>EXCEPTION
> when utl_file.INVALID_PATH then
> raise_application_error(-20000, 'UTL_FILE: Invalid path');
>END;
 
>I am getting the following error on execution :
 

>ERROR at line 1:
>ORA-06510: PL/SQL: unhandled user-defined exception
>ORA-06512: at "SYS.UTL_FILE", line 85
>ORA-06512: at "SYS.UTL_FILE", line 120
>ORA-06512: at "RAINAA.AJFILE", line 4
>ORA-06512: at line 1
 

>The parameter UTL_FILE_DIR with the path used in the program
>has been entered in the init<SID>.ora file which is used in the
>PL/SQL program. Still, this error occurs. Can anybody out there help me?
 

>Best regards,
 

>Ajay.
 

>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/ Now offering spam-free web-based newsreading

Mark Zawadzki, late of Waynesboro, Va.
'...there is not a sprig of grass that shoots uninteresting to me.'

                                                 Thomas Jefferson, 1790. 
Received on Wed Apr 01 1998 - 00:00:00 CST

Original text of this message

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