Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Usage dbms_output.enable
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).
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>...Received on Tue Mar 04 1997 - 00:00:00 CST
> 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;
>
![]() |
![]() |