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: Help with UTL_FILE under 7.3.2?

Re: Help with UTL_FILE under 7.3.2?

From: <nwhitehead_at_rocketmail.com>
Date: 1997/10/06
Message-ID: <343945ee.2650090@news.cybernex.net>#1/1

On 4 Oct 97 13:26:08 EST, jmatthews_at_nova.wright.edu (Dr. John B. Matthews) wrote:

>Hi!
>
>I'm trying to use the package UTL_FILE to write to an OS file
>under Oracle 7.3.2 on Solaris. Sadly the code below dies with an
>invalid_path exception. Can anyone offer a clue?
>
>News or email is fine; thanks in advance.
>
>John
>----------------------------------------------------------------
>John B. Matthews, M.D.
>jmatthews_at_nova.wright.edu, john_matthews_at_ccmail.dayton.saic.com
>"Whom the gods would destroy, they first invite to program in C"
>
>-----
>
> PROCEDURE ftest IS
>
> f utl_file.file_type;
>
> BEGIN
>
> f := utl_file.fopen(
> '/oracle/app/oracle/product/7.3.2','ftest.txt', 'w');
> utl_file.put_line(f, 'Hello world!');
> utl_file.fclose(f);
>
> EXCEPTION
> WHEN utl_file.invalid_path THEN
> DBMS_Output.Put_Line('Invalid path.');
> WHEN utl_file.invalid_mode THEN
> DBMS_Output.Put_Line('Invalid mode.');
> WHEN utl_file.invalid_operation THEN
> DBMS_Output.Put_Line('Invalid operation.');
> WHEN OTHERS THEN
> DBMS_Output.Put_Line(SQLCODE||': '||SQLERRM);
>
> END;
>
>

I guess the first question would be, have you checked the database initialization parameter UTL_FILE_DIR ? Without it, Oracle does not have permission to write anywhere and oddly, that is the error message it gives.

Nicholas
nwhitehead_at_rocketmail.com Received on Mon Oct 06 1997 - 00:00:00 CDT

Original text of this message

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