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

Source: Internet
Author: User

The following error occurs when you use dbms_output.put_line to output the statement:

Begin user_priv (username => 'hr'); end;
 
ORA-20000: ORU-10027: buffer overflow, limit of 2000 bytes
ORA-06512: at "SYS. DBMS_OUTPUT", line 32
ORA-06512: at "SYS. DBMS_OUTPUT", line 97
ORA-06512: at "SYS. DBMS_OUTPUT", line 112
ORA-06512: at "HR. USER_PRIV", line 20
ORA-06512: at line 2
 
Obviously, when we are outputting, the buffer size of the output result is controlled by DBMS_OUTPUT.ENABLE. The default buffer size is 20000, and the maximum limit of each row is 32 k, the following example shows that a stored procedure returns results only after all data is cached. So when we use a cursor for output, if there are a lot of results, it will exceed this value to report ORA-20000, ORU-10027: Buffer overflow, limit of <buf_limit> bytes this error
Solution:
Add DBMS_OUTPUT.ENABLE (buffer_size => null) after the Stored Procedure begin to indicate that there is no limit.

For the Stored Procedure user_priv, see the document:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.