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: set serveroutput on

Re: set serveroutput on

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Wed, 18 Aug 1999 18:26:36 GMT
Message-ID: <37c7fa4c.199623052@newshost.us.oracle.com>


A copy of this was sent to Kenneth C Stahl <BluesSax_at_Unforgettable.com> (if that email address didn't require changing) On Wed, 18 Aug 1999 10:41:25 -0400, you wrote:

>Are you trying to use dbms_output inside the pl/sql? If so, what you really
>need to do is write a listener which will perform a dbms_output.get_line to
>retrieve the data from the implicit pipe that dbms_output uses.
>

dbms_output doesn't use any pipes. It "writes" lines to a plsql table.

You use dbms_output.enable to tell dbms_output to start buffering output into this plsql table.

Your *session* can use dbms_output.get_line(s) to get this buffered output. You cannot write a "listener" in another session that can "see" your output from your session as the plsql table is local to your session.

>However, I'd recommend that you do not use dbms_output in a pl/sql block
>that is embedded in an OCI program unless you know absolutely that yours is
>the only program that will ever use dbms_output. The moment you create a
>listener it will received everything written to dbms_output no matter what
>program puts it there. You'd be better off using dbms_pipe and having an
>implicit pipe. That way when you can listen just for one particular pipe
>identifier.
>

you are mixing up dbms_pipe and dbms_output -- they are completely separate and distinct from each other and do not use each other in their implementations.

>Frans Laurijssen wrote:
>
>> Hello,
>> I am a oracle developer and maybe this is not the correct group to post
>> this question.
>> I am using oci and PL/SQL and trying to call a procedure from oci.
>> I need to set the equivalent of 'set serveroutput on' from the SQLPlus
>> sql
>> interpreter in my OCI program because the output is not returned to my
>> program.
>> Question 1
>> Can I do this from my oci program?
>> Question 2
>> Is it possible to configure the server or my login account so that
>> serveroutput is
>> always on?
>>
>> Thanks
>> Please reply to fjl_at_kub.nl

--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Wed Aug 18 1999 - 13:26:36 CDT

Original text of this message

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