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