ORA-20000, ORU-10027, ORA-06512: buffer overflow, limit of 20000 bytes

Environment:

Oracle 11g R2

Situation:

Buffer overflow occurs if print out too many data.

SET PAGESIZE 0
SET FEEDBACK OFF
SET HEAD ON
SET TRIMOUT OFF
SET TRIMSPOOL OFF
SET LINESIZE 200
SET ECHO OFF
SET SERVEROUTPUT ON FORMAT WRAPPED

......
BEGIN
   ......
   DBMS_OUTPUT.PUT_LINE('...');

END;

Solution:

Use DBMS_OUTPUT.ENABLE([SIZE]) to increase the buffer size.

DBMS_OUTPUT.ENABLE(1000000);

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s