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: No Need For UTL_FILE_DIR?

Re: No Need For UTL_FILE_DIR?

From: Dennis Hancy <dennishancy_at_eaton.com>
Date: 26 May 2004 06:14:10 -0700
Message-ID: <248587ca.0405260514.728e8b86@posting.google.com>


Are there any issues with specify a UNIX path for the directory in FOPEN? I keep getting the Invalid Directory Path error. I've tried several directories, thinking it was an access right problem, but nothing works.

This is the syntax I am using:

v_file_handle := utl_file.fopen('/APPS/DB/fa/1.0.0/out', 'abc.txt', 'w');

Dennis Hancy
Eaton Corporation
Cleveland, OH

"Joe" <heltibrand_at_NO_SPAMkarpel.com> wrote in message news:<10ash28djd1tbb0_at_corp.supernews.com>...
> So as long as there is a directory defined, you don't need to have the
> UTL_FILE_DIR=<whatever> set?
>
> Can the directory you create be on a mapped drive (Win2K world)? From what
> I remember I could never get UTL_FILE to work with mapped drives, or any
> external drive.
>
> "Anurag Varma" <avdbi_at_hotmail.com> wrote in message
> news:7nprc.190$ZQ.58_at_nwrddc03.gnilink.net...
> >
> > "Jeremy" <newspostings_at_hazelweb.co.uk> wrote in message
> > news:MPG.1b1831c27c36fb62989c10_at_news.individual.net...
> > > In article <c8l5ht$k01$1_at_unbe.sarenet.es>, Jon says...
> > > > trying to output a file using utl_file package I have created a
> directory
> > > > object (windows server) and UTL_FILE.FOPEN in that directory:
> > > >
> > > > CREATE DIRECTORY test AS 'd:\backup\test';
> > > > ...
> > > > DECLARE
> > > > file_handle utl_file.file_type;
> > > > BEGIN
> > > > file_handle := utl_file.fopen ('test', 'file.txt', 'W');
> > > > ...
> > > >
> > > > the error is the following one: ORA-29280: invalid directory path
> > > >
> > > >
> > >
> > > The CREATE DIRECTORY stuff has, as I understand it, nothing whatsoever
> > > to do with using UTL_FILE.
> > >
> > > Instead, you need to deine a parameter UTL_FILE_DIR in the init.ora for
> > > your database (or however parameter settings are managed for the db
> > > version you are using - it is different with 9i)
> > >
> > > e.g.
> > >
> > > utl_file_dir = /space/utlfiledir8i
> > >
> > > hth
> > >
> > > --
> > >
> > > jeremy
> >
> > At least from 9i onwards .. create directory has everything to do with
> utl_file. In fact its now
> > recommended to
> > use the create directory for utl_file ... instead of using the
> utl_file_dir.
> > The pl/sql built in packages manual mentions this.
> >
> > Anurag
> >
> >
Received on Wed May 26 2004 - 08:14:10 CDT

Original text of this message

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