Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: DBMS_OUTPUT.PUT_LINE doesn't work
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