Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

When does DBMS_OUTPUT.PUT_LINE actually send to the display?

MrGibbageApr 10 2013 — edited Apr 11 2013
I have a script which needs troubleshooting with DBMS_OUTPUT.PUT_LINE inside of a loop, but nothing is being written to the screen (I fear I am in an infinite loop, but I can't tell because nothing is being written to the screen). I do have SET SERVEROUTPUT ON SIZE unlimited enabled. I even have some lines to be written before the loop that I am not seeing. I have another test program which does write to the screen as expected. The test program is exactly the same as my real program except I pulled all of the heavy work out of the loop and just output one line--the index number. However, it seems to me that it collects a bunch of lines together before it actually sends them to the screen, rather than write it to the screen as each PUT_LINE is encountered. The reason I think that is because it seems to write in spurts, rather than a continuous stream of new lines, one at a time.

Is there a way to make PUT_LINE actually write to the screen right then and there, without caching or delay? (I don't want help with the infinite loop--I think I can handle that. I just want help with PUT_LINE, please)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 9 2013
Added on Apr 10 2013
7 comments
4,983 views