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: Debug message in file

Re: Debug message in file

From: <oratune_at_aol.com>
Date: Fri, 25 Aug 2000 20:22:27 GMT
Message-ID: <8o6khc$g09$1@nnrp1.deja.com>

In article <8niubp$c04$1_at_reader1.fr.uu.net>,   "Jérôme Perruchas" <jpsplus_at_ifrance.com> wrote:
> Hi,
>
> I'm on NT4 with Oracle 8.0.6
>
> When I execute a procedure, I want to know different the value from a
> variable.
> I tried to use the package dbms_output but as I have many values, I
 would
> like to put them in a file instead of displaying them on the screen.
> I know that the package utl_file can do that but when I use it, I have
 an
> error.
> Here my procedure :
>
> create procedure jp.detest is
> i integer;
> fich utl_file.file_type ;
>
> begin
> fich:=utl_file.fopen('c:\','debug.txt','w');
> i:=1;
> utl_file.put_line(fich,'first value i : '|| to_char(i));
> i:=3;
> utl_file.put_line(fich,'second value i : '|| to_char(i));
> utl_file.fclose(fich);
> end;
>
> This is the error :
>
> SQLWKS> execute jp.detest ;
> ORA-06510: PL/SQL: unhandled user-defined exception
> ORA-06512: at "SYS.UTL_FILE", line 88
> ORA-06512: at "SYS.UTL_FILE", line 146
> ORA-06512: at "JP.DETEST", line 6
> ORA-06512: at line 2
>
> Anybody have a solution ?
>
> thanks
>
>

This may be a bit simple-minded, but have you checked that utl_file_dir parameter is set in the init<SID>.ora file? Presuming that line 1 is the 'create procedure' line it appears that you are having trouble opening the file.

--
David Fitzjarrell
Oracle Certified DBA


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Aug 25 2000 - 15:22:27 CDT

Original text of this message

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