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: pl/sql write file

Re: pl/sql write file

From: Al Taylor <pwc_al_at_yahoo.com>
Date: Sat, 13 Jan 2001 19:28:07 GMT
Message-ID: <b%186.17285$OD6.1336916@news1.telusplanet.net>

If you are running on UNIX, make sure you have the correct permission in the path. I have also found that you have to explicitly state the utl_file_dir path. Don't be insulted by this question, but did you restart the Oracle Db after your mod's to the init$SID.ora file???

Help yourself out by implementing the utl_file defined exceptions, this will help you debug your problem.

Al Taylor (Not a Oracle Guru but I have used the UTL_FILE Package recently)

"Rob Zwartjes" <rzwartje_at_rob.home.nl> wrote in message news:slrn961aes.7rl.rzwartje_at_rob.home.nl...
> Hello guru's,
>
> I am having a problem with writing data to a file and I was wandering if
 you
> could help me out here. The sql script goes as follows:
>
> declare
> v_out_line varchar2(2000);
> fileID utl_file.file_type;
>
> begin
> fileID := utl_file.fopen ('/tmp','tst.csv','W');
> v_out_line := 'This'
> ||','||'is'
> ||','||'a'
> ||','||'piece'
> ||','||'of'
> ||','||'text.';
> utl_file.put_line(fileID,v_out_line);
> utl_file.fclose(fileID);
> end;
>
> I am getting errors with this script like "unhandled user-defined
 exception"
> and some more nasty errors. I read somewhere that I should put a line like
> utl_file_dir = * to overcome this problem but unfortunately it doesn't.
>
> Thanks in advance,
> Rob
>
> BTW if this is the wrong newsgroup for postings these questions, point me
 to
> the wright one please.
>
Received on Sat Jan 13 2001 - 13:28:07 CST

Original text of this message

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