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: DBMS_OUTPUT.PUT_LINE doesn't work

Re: DBMS_OUTPUT.PUT_LINE doesn't work

From: Roger Jackson <rjackson_at_wire.net.au>
Date: 1998/10/31
Message-ID: <71dfq2$tu9$1@caley.wire.net.au>#1/1

Hi Vagelis,

You need to do this first
SQL> set serveroutput on

Note that 'serveroutput' is one word. If serveroutput is not turned on, nothing will be displayed even if you call the DBMS_OUTPUT.ENABLE packaged procedure.

The way DBMS_OUTPUT works is as follows:

In a PL/SQL program, calls to DBMS_OUTPUT.PUT_LINE will add lines to the buffer. Nothing is actually displayed until the program executes completely and control is transfered back to SQL*Plus or SQL*DBA. At this point, if serveroutput is on, SQL*Plus or SQL*DBA will make a call to DBMS_OUTPUT.GET_LINES and print the results to the screen.

If your PL/SQL program runs for a long time, you actually have to wait until the program executes and control goes back to SQL*Plus in order to see any information displayed by DBMS_OUTPUT.PUT_LINE.

Regards

Roger

vagelis Hristidis wrote in message <36321085.A1FDBAA3_at_cc.ece.ntua.gr>...
>I try to have some text printed in sqlplus.
>I type:
>
>exec DBMS_OUTPUT.enable;
>exec DBMS_OUTPUT.PUT_LINE('hallo');
> I get the answer "PL/SQL procedure successfully completed."
> for both commnads but nothing is printed.
>What's wrong?
>
>Thanks in advance
>--
>Vagelis S. Hristidis
>Electrical and Computer Engineering
>National Technical University of Athens
>e-mail:exrist_at_cc.ece.ntua.gr
>URL:http://www.cc.ece.ntua.gr/~exrist
>
>
Received on Sat Oct 31 1998 - 00:00:00 CST

Original text of this message

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