Sounds like you are using DBMS_OUTPUT
, which always only starts to actually output the results after the procedure completes.
If you want to have real/near time monitoring of progress you have 3 options:
Use
utl_file
to write to a OS file. You will need access to the db server OS file system for this.Write to a table and use
PRAGMA AUTONOMOUS_TRANSACTION
so you can commit the log table entries without impacting your main processing. This is easy to implement, and readily accessible. Implemented in a good way this can become a de facto standard for all your procedures. You may then need to implement some sort of house keeping to avoid this getting too big and unwieldy.A quick and dirty option which is transient, is to use
DBMS_APPLICATION.SET_CLIENT_INFO
, and then queryv$session.client_info
. This works well, good for keeping track of things, fairly unobtrusive and because it is a memory structure is fast.
DBMS_OUTPUT
really is limited.