Re: dbms_output.putlin show up AFTER completion???

From: andrewst <member14183_at_dbforums.com>
Date: Fri, 11 Jul 2003 10:44:33 +0000
Message-ID: <3099492.1057920273_at_dbforums.com>


Originally posted by Andre
> Hello all,
>
> I have made a procedure which is running a very, very long time (about
> 20 hours)
>
> Within the procedure I put some output-lines, to show the user that
> the procedure is still running. Lines like this
> DBMS_OUTPUT.PUT_LINE('percentage ready : '!!mypercentage);
>
> But when I start the procedure I DO NOT see these lines. The lines do
> appear AFTER the procedure is finished. So after 20 hours I get a lot
> of output-lines at once.
>
> How can I show the user the lines while running the procedure???
>
> (Using oracle 8.1.7, I am starting the procedure from sql+ (exec
> myserver.myprocedure))
>
>
> Thanks a lot and kind regards,
> Andre van Rossem
> The Netherlands
A PL/SQL procedure cannot write messages to the SQL Plus screen while it is executing; it is executing on the server, not on your PC.

What you can do is monitor the progress from another SQL Plus session. For example. if you build in calls to DBMS_APPLICATION_INFO.SET_SESSION_LONGOPS into your PL/SQL, then from another session you can query the view V$SESSION_LONGOPS to monitor progress.

--
Posted via http://dbforums.com
Received on Fri Jul 11 2003 - 12:44:33 CEST

Original text of this message