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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Problem with UTL_FILE.FOPEN 'append' option

Re: Problem with UTL_FILE.FOPEN 'append' option

From: A.M.Andreyev <ama_at_uaz.ru>
Date: Thu, 8 Feb 2001 18:47:16 +0300
Message-ID: <95uf2t$pal$1@core.uaz.ru>

As far as I can judge, it is an ORACLE
process that creates your file, if
threre is none; you seem to create it in your personal directory. ORACLE
processes must have write permittion to
it for that. And if you create a
file beforehand, this file may be freely writtern to.
Is that the case?

--
A.M. Andreyev,
ORACLE DBA
"Jining Han" <hanj_at_mailcity.com> wrote
in message
news:95c70f$vrh$1_at_nnrp1.deja.com...

> In article
<95bm9e$fqp$1_at_nnrp1.deja.com>,
> monsri_at_my-deja.com wrote:
> > Hello,
> >
> > I've written the following stuff to
write files on the
> > server side:
> >
> > > Procedure test
> > > IS
> > > DEF_EXPORT_DIR varchar2(30)
='/cce/myLogin';
> > > F_NAME varchar2(30) ;
> > > F_XML
UTL_FILE.FILE_TYPE;
> > > REF_NAME varchar2(30)
='TEST';
> > > pout_RC number;
> > > BEGIN
> > > F_NAME:='myFile.xml';
> > > dbms_output.put_line('before
OPEN');
> > > F_XML
:=UTL_FILE.FOPEN(DEF_EXPORT_DIR, F_NAME, 'a');
> > > dbms_output.put_line('after
OPEN');
> > > UTL_FILE.PUT_LINE(F_XML, 'Hello
world');
> > > dbms_output.put_line('after PUT
LINE');
> > > UTL_FILE.FCLOSE(F_XML);
> > > dbms_output.put_line('after
FCLOSE');
> > > EXCEPTION
> > > [here follow my
exceptions...]
> > >
> > > END test;
> >
> > If the file myFile.xml already
exists, no trouble, but when
> > myFile.xml still DOES NOT exist in
/cce/myLogin, I get the
> > following error:
UTL_FILE.INVALID_OPERATION ("the file could
> > not be opened or operated on as
requested").
> >
> > At the OS level, here is what we
got: the login 'oracle' has
> > been added to an 'xml_export' group
created for this very
> > purpose (be able to write in
/cce/myLogin). The Unix user
> > 'myLogin' belongs to this
'xml_export' group, and the
> > UTL_FILE_DIR parameter of my
init.ora points to '/cce/myLogin'
> > (myLogin's $HOME). This /cce/myLogin
directory is in 777:
> > > ls -ld /cce/myLogin
> > > drwxrwxrwx 3 myLogin xml_export
512 Feb 1 11:19 /cce/myLogin
> >
> > Any further suggestions... ??
> >
> > Thanks a lot !
> > Seb
> >
> > Sent via Deja.com
> > http://www.deja.com/
> >
>
> Just curious: how do you append to an
non-existing file? >
> --
> Jining Han
> Sallie Mae
> >
> Sent via Deja.com
> http://www.deja.com/
Received on Thu Feb 08 2001 - 09:47:16 CST

Original text of this message

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