Problem:
You receive a "buffer overflow" error message in a PL/SQL script as the the amount of data being buffered using DBMS_OUTPUT increases.
Solution:
Add the following line to the beginning of your PL/SQL block, right after the BEGIN statement:
DBMS_OUTPUT.ENABLE(50000)
This increases the buffer size to 50,000 bytes