Re: DBMS_SQL question

From: Bill and Jan Allaway <allaway_at_hooked.net>
Date: 1996/02/21
Message-ID: <312B18B2.19B5_at_hooked.net>#1/1


DBMS_OUTPUT is a bizzarre beast. You would think Oracle would be smart enough to put a proper print command in their programming language. Most programming languages have them. Why they continue limping along with DBMS_OUTPUT instead of doing it right is a question I would like to see answered. But enough griping.

DBMS_OUPUT allocates a buffer when it is enabled(that's what the 5000 is, the size of the buffer). In repeated calls, the space in the buffer is not completely flushed(no hard facts, just my observation trying to use it.) so you eventually fill it up with junk and can't output anything anymore. Depending on the platform, I think you can set it up to 32767 bytes or some such magic number. Check the comments in the script that generates it in $ORACLE_HOME/rdbms/admin for the exact number. What you are doing is the best solution, but you might buy a little insurance by increasing the buffer size on your enable. If your queries return very many rows, it is pretty easy to overflow the buffer when set as low as 5000.

Hope this helps.
Bill Allaway Received on Wed Feb 21 1996 - 00:00:00 CET

Original text of this message