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: Usage dbms_output.enable

Re: Usage dbms_output.enable

From: Gert Rijs <gem_at_wirehub.nl>
Date: 1997/03/04
Message-ID: <01bc28da$d72c0860$0100007f@gertrijs>#1/1

the SET SERVEROUTPUT command not only (under the hood) calls

dbms_output.enable but also informs sql*plus that it should read the
dbms_output buffer after each pl/sql invocation (i believe with
dbms_output.get_line).

if you never enter SET SERVEROUT sql*plus will not display the buffer. Perhaps you can include the SET SERVEROUT statement in the glogin.sql or login.sql file so it will automatically execute everytime you start sql*plus.
hope this helps,

        Gert

-- 
At Home: gem_at_wirehub.nl
At Work: gert.rijs_at_corp.ah.nl

John Hough <q6y_at_ornl.gov> wrote in article <331C5EC9.2214_at_ornl.gov>...

> To all:
>
> I am attempting to write a pl/sql procedure that utilizes
> the dbms_output.put_line package. In the past I have
> utilized this for debugging and simply typed
> "set serveroutput on size 100000"
> before executing the procedure and the results were
> displayed to the screen. My current project leader does
> not want the persons exeucting the stored procedure to
> have to turn serveroutput on in order to see the put_line
> results. So I am trying to get the procedure to do the
> same utilizing the dbms_output.enable call, so far no
> luck. I have placed a snippet of the code below,
> where should the call to dbms_output.enable be to have
> the buffer go to the screen. Do any other calls need to
> be made. I tried to place it as the first line of code
> with a disable at all exit points but it did not work.
>
> Help???, and thanks
>
> John Hough
>
>
> BEGIN
>
> OPEN c_locks_held;
>
> FETCH c_locks_held into v_osuser;
>
> WHILE c_locks_held%FOUND LOOP
> dbms_output.put_line(rpad(v_osuser,10,' '));
> FETCH c_locks_held into v_osuser;
> END LOOP;
>
> CLOSE C_LOCKS_HELD;
>
> END;
>
Received on Tue Mar 04 1997 - 00:00:00 CST

Original text of this message

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