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: PL/SQL : serveroutput on inside begin..end block Possible ? Impossible??

Re: PL/SQL : serveroutput on inside begin..end block Possible ? Impossible??

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Wed, 6 Jul 2005 06:00:36 -0400
Message-ID: <-5qdnbQMtPSCTFbfRVn-iQ@comcast.com>

"baka" <mesundara_at_hotmail.com> wrote in message news:1120637544.661569.158750_at_g43g2000cwa.googlegroups.com...
> Thanks for your quick reply.
>
> I think DBMS_OUTPUT.ENABLE will only enable the buffer size,
> it does not provide the facility of printing on the terminal? And
> only sqlplus command " Set serverouput on size 10000...."
> will hit the two birds in one stone. i.e setimng the buffer size
> and printing it on the screen.
>
> Any more suggestion Please?
>
> Thnaks in Advance.
>

your PL/SQL block is executed by the database, so it cannot control what SQL*Plus is doing

the DBMS_OUTPUT package is designed to buffer OUTPUT from the DBMS during PL/SQL execution, so that the client program can retrieve the output for display, storage, etc.

so SET SERVEROUTPUT ON is doing at least two things: [_] enables DBMS_OUTPUT
[_} sets a SQL*Plus internal flag that tells it to read the DBMS_OUTPUT buffer after each SQL or PL/SQL statement is executed -- which involves multiple calls to DBMS_OUTPUT as well as internal SQL*Plus (not database server) logic to display the results to the screen

so, if you are trying to control SQL*Plus behavior with a SQL*Plus command, that command cannot be executed by the database

++ mcs Received on Wed Jul 06 2005 - 05:00:36 CDT

Original text of this message

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