Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: dbms_output in a PL/SQL loop...
"Gilles Mercier" <gilles.mercier_at_urbanet.ch> wrote in message
news:3e292f2f$1_at_news.swissonline.ch...
> Hi,
> I have been trying to put a dbms_outoput.put_line in a PL/SQL Loop to get
a
> "real time" print of where the loop actually is working, but it seem that
> all the output records print on the screen only when the loop is
finished...
>
> Does anybody know how to get a "real time advance indicator" for a PL/SQL
> loop ?
>
> Thanks in advance for your help...
>
> Gilles
>
>
Some excellent solutions already provided:
V$SESSION_LONGOPS, UTL_FILE, Pipelined function....
Here is yet another possible alternative:
Have the main process sending messages via DBMS_PIPE, with a 'listener' (i.e.SQL*Plus in a different session) reading the pipe (and inserting rows back into a log table, if you wish), then dbms_lock.sleeping, in an infinite loop.
Available in all versions since Oracle 7 (.3?)
Regards,
Paul
Received on Sun Jan 19 2003 - 12:51:35 CST