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: Flushing the dbms_output.put_line Buffer...

Re: Flushing the dbms_output.put_line Buffer...

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Wed, 5 Apr 2000 14:02:36 +0200
Message-ID: <8cfa1f$mou$1@news2.isdnet.net>


The dbms_output buffer is flushed and displayed by SQL*Plus only when the PL/SQL block is finished.

To know at what point of the execution you are, you can use the DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure in the pl/sql block and retrieve this information from another sessionin the column CLIENT_INFO of the v$session view.

session 1:
v734> select sid from v$session where audsid=userenv('SESSIONID');

       SID


         9
v734> exec dbms_application_info.set_client_info('Step 1'); PL/SQL procedure successfully completed.

session 2:
v734> select client_info from v$session where sid=9; CLIENT_INFO



Step 1

session 1:
v734> exec dbms_application_info.set_client_info('Step 2'); PL/SQL procedure successfully completed.

session 2:
v734> select client_info from v$session where sid=9; CLIENT_INFO



Step 2

--
Have a nice day
Michel

<ekophyne_at_my-deja.com> a écrit dans le message : 8cf3gs$cgp$1_at_nnrp1.deja.com...
> Hi
>
> I'm using a CURSOR FOR loop in an anonymous block to perform some
> fiddly updates to a table. I'm keeping count of the number of
> iterations of the loop in a PLS_INTEGER variable.
>
> I'd like to use dbms_output.put_line to give me a loop count every 1000
> rows. However, I don't see any output until the whole process finishes.
> That is to say, the output buffer is not flushed until the block exits.
>
> I've tried putting the dbms_output statement inside its own BEGIN & END
> block, but this has no apparent effect.
> I've also tried toggling dbms_output.enable/disable. (According to my
> Steve Feurstein book, dbms_output.disable should force a flush...) but
> this seems not to work either.
>
> Has anyone found a solution?
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Wed Apr 05 2000 - 07:02:36 CDT

Original text of this message

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