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 12:25:57 GMT
Message-ID: <37c3a612.178061278@newshost.us.oracle.com>


A copy of this was sent to Frans Laurijssen <fjl_at_kub.nl> (if that email address didn't require changing) On Wed, 18 Aug 1999 14:15:11 +0200, you 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

You need to call dbms_output.enable to enable the buffering of output. After you run a procedure, you need to call dbms_output.get_lines to get the buffered output. this is what sqlplus and svrgmrl do -- by setting serveroutput on in these apps, you are instructing them to call dbms_output.enable and after each statement call dbms_output.get_lines to get and print the results.

--
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 - 07:25:57 CDT

Original text of this message

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