Re: DBMS_OUTPUT.ENABLE not working on Oracle 7.1.6.2.0

From: Scott Urman <surman_at_oracle.com>
Date: 1996/02/02
Message-ID: <4erl5l$h1f_at_inet-nntp-gw-1.us.oracle.com>#1/1


In article <4er70k$k98_at_nkosi.well.com>, rkohlhas_at_well.sf.ca.us (Robert Kohlhase) writes:
|>
|> DBMS_OUTPUT.ENABLE doesn't seem to do anything at all. Is this a bug or is
|> there some trick to it I'm missing? Is there a workaround?
|> We need to be able to use it inside of a packaged procedure which will be
|> called from a program interface.
|>
|> We're running Oracle7 Server Release 7.1.6.2.0 - Production Release With the
|> distributed, replication and parallel query options and PL/SQL Release
|> 2.1.6.2.0 - Production.
|>
|> Here's some sample output from the simplest case scenario attempt:
|>
|> SQL> begin
|> 2 DBMS_OUTPUT.ENABLE;
|> 3 end;
|> 4 /
|>
|> PL/SQL procedure successfully completed.
|>
|> SQL> sho serverout
|> serveroutput OFF

                ^^^

Here you go. You will only see something if serveroutput is ON. All that ENABLE does is set the size of the internal buffer in the DBMS_OUTPUT package. All that PUT_LINE does is add a line to this internal buffer. When serveroutput is ON, SQL*Plus will query the buffer after the statement is complete, and print the results to the screen. You won't see any output unless you are using SQL*Plus or Server Manager with serveroutput ON, unless you explicitly call DBMS_OUTPUT.GET_LINES yourself.

|> SQL> exec DBMS_OUTPUT.put_line('hello world');
|>
|> PL/SQL procedure successfully completed.
|>
|> SQL> (no text is output)
|>
|> Thanks for any help!
|>
|> Robert Kohlhase, rkohlhas_at_well.com
  Received on Fri Feb 02 1996 - 00:00:00 CET

Original text of this message