Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: DBMS_OUTPUT.PUT_LINE .. newbie question

Re: DBMS_OUTPUT.PUT_LINE .. newbie question

From: David Frost <frostd_at_logica.com>
Date: 1997/06/10
Message-ID: <339CFC66.893B6FFA@logica.com>#1/1

Dug Birdzell wrote:

> Hi everybody:
>
> I am having some trouble getting DBMS_OUTPUT.PUT_LINE to display
> output
> in my SQL PLUS session.
>
> If I create hello.osp:
>
> CREATE or REPLACE PROCEDURE hello AS
>
> BEGIN
> DBMS_OUTPUT.ENABLE (2000);
> DBMS_OUTPUT.PUT_LINE ('In procedure hello');
> END;
> /
>
> and hello.sql:
>
> hello.sql
>
> BEGIN
> DBMS_OUTPUT.PUT_LINE('calling procedure hello');
> hello;
> END
> /
>
> and compile and execute thusly:
>
> SQL> start hello.osp
>
> Procedure created.
>
> SQL> start hello.sql
>
> PL/SQL procedure successfully completed.
>
> SQL>
>
> I wonder why I don't see the 2 lines of output. Any advice is
> appreciated...thanks!

Dug,

    You need to type SET SERVEROUTPUT ON beforehand to actually enable the output to be displayed. Do this (for example) from SQLPlus and then start hello.sql.

Cheers
David FrostBrookleigh Consultants UK Received on Tue Jun 10 1997 - 00:00:00 CDT

Original text of this message

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