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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Q: buffer overflow with DBMS_OUTPUT

Re: Q: buffer overflow with DBMS_OUTPUT

From: Patrick Ryan <pat_at_halcyon.com>
Date: 1997/08/28
Message-ID: <5u4kpd$ldp$1@brokaw.wa.com>#1/1

Sorry, can't be done.

For heavier duty tracing, you'll want to write to a table. The industrial strength solution would be a seperate tracing session that runs constantly in the background and using pipes to send your output to it. There is no way to flush DBMS_OUTPUT from inside your PL/SQL program, since it depends on exiting from that program to do its buffer flush.

-Pat Ryan
 LIAS Senior Programmer/Analyst
 My views do not necessarily represent those of my company; nor indeed of  any other sentient being.

Bernd Becker (bernd.becker_at_ibm.net) wrote:
: I have a problem with buffer overflow when using the DBMS_OUTPUT
: package.
: I want to write data from a database to the screen (STDOUT) in a loop
: using
: DBMS_OUTPUT.PUT_LINE, something like this:
:
: set serveroutput on size 1000000;
: LOOP
: FETCH ...
: DBMS_OUTPUT.PUT_LINE('num1='||usr_number1);
: .....
: ....
: END LOOP
:
: After some number of iterations I get the buffer overflow.
:
: How can I get the buffer to be flushed, for example after each iteration
: of LOOP?
:
: I have tried this without success:
: LOOP
: DBMS_OUTPUT.ENABLE(1000000);
: FETCH ...
: DBMS_OUTPUT.PUT_LINE('num1='||usr_number1);
: .....
: DBMS_OUTPUT.DISABLE;
: END LOOP
:
: Thanks for any help.
:
: --
: Bernd Becker
: bernd.becker_at_ibm.net
:
:
:
Received on Thu Aug 28 1997 - 00:00:00 CDT

Original text of this message

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