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: UTL_FILE Help - ORA-29280

Re: UTL_FILE Help - ORA-29280

From: Randy Harris <randy_at_SpamFree.com>
Date: Fri, 01 Apr 2005 00:18:02 GMT
Message-ID: <_q03e.13157$ZB6.4109@newssvr19.news.prodigy.com>


"Jonathon" <jsuggs_at_gmail.com> wrote in message news:1112314311.467309.130340_at_z14g2000cwz.googlegroups.com...
> I am having some troubles trying to create a procedure that will create
> an output file. When I try to use fopen, it gives me an error saying
> "invalid directory path." I had seen a previous group talking about
> this, tried their suggestions and am still having issues. I tried
> creating a directory, no luck...where does the utl_file_dir come into
> play? Does that have to be set for this to work? I have tried
> everything, even setting chmod 777 on the directory. Open to any
> suggestions.
>
> Here is my code:
>
> CREATE OR REPLACE PROCEDURE rpts_mapping_engine() IS
> v_fh utl_file.file_type;
> BEGIN
> v_fh := utl_file.fopen(location => '/home/oracle/pdl_reports',
> filename => 'test.html',
> open_mode => 'w');
> utl_file.put_line(file => v_fh, buffer => 'Test');
> utl_file.fclose(file => v_fh);
> END rpts_mapping_engine;
>

I don't know about 10g, but in 8i and 9i both, the utl_file_dir must be set. You won't be able to write to a file without having set it.

-- 
Randy Harris
(tech at promail dot com)
Received on Thu Mar 31 2005 - 18:18:02 CST

Original text of this message

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