Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to force a flush of dbms_output.put_line
Hi,
The program to debug send its information throught a dbms_pipe, each line.
instead of dbms_output.put_line ( .....) ^ Same V debug_to_pipe ( to_char ( ...... ) ) ;
or define more debug_to_pipe
procedure debug_to_pipe(reason varchar2) is s integer; begin dbms_pipe.pack_message(reason); s := dbms_pipe.send_message('DEBUG'); if s <> 0 then raise_application_error(-20000, 'Error:' || to_char(s) || ' sending on pipe'); end if; end debug_to_pipe ; The debug_display program is a small program, it read the pipe dbms_pipeand display the information to the screen and that all.
procedure pipe_to_screen is
s integer; msg varchar2(200);
s := 1 / 0 ;
end if ;
end pipe_to_screen;
#!/bin/sh
( echo "whenever sql_error exit 0\nset serveroutput on\nspool on"
while true
do
echo "begin pipe_to_screen ; end ;\n/"
done ¦ sqlplus -s /
Regards Francois.
Sergey V. Fedorishin <sfedor01_at_grads.fiu.edu> wrote in article
<5o25p1$2s7_at_isis.fiu.edu>...
> Wayne Linton (lintonw_at_cadvision.com) wrote:
> : Xuewei Zhou wrote:
> : >
> : > I notice dbms_output.put_line does not print out the lines until my
procedure
> : > is finished. I put 100 put_line in my procedure, it doesn't print one
by one,
> : > it prints all of them at the end. Is there a way to force it print
right after
> : > dbms_output.put_line is called?
> : >
> : > Thanks,
> : >
> : > zhou
> : Try writing to a pipe, and have another task running that reads the
pipe
> : and displays the message.
>
> It seems there is no way to flush dbms_output. It built this way. But,
> it is not clear yet how to 'display the message':
dbms_output.put_line???!
> I was trying to use low level file I/O but couldn't open file via fopen:
> it fires invalid_path on every combination of basename and filename I've
> tryed. Any suggestion would be helpful.
>
> TIA -Sergey.
>
> : Wayne Linton
> : Shell Canada Ltd.
>
>
Received on Mon Jun 16 1997 - 00:00:00 CDT
![]() |
![]() |