PLSQL Developer 出现ORU-10027: buffer overflow, limit of 10000 bytes

简介:

错误提示:

ERROR at line 1:
ORA-20000: ORU-10027: buffer overflow, limit of 1000000 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 BNZF.BNQUERYLINE 138
ORA-06512: at line 3

查阅了一下文档,这里贴出一些与本错误有关的信息:

DBMS_OUTPUT.ENABLE (buffer_size IN INTEGER DEFAULT 20000)

PUT and PUT_LINE Procedure Exceptions:
ORA-20000, ORU-10027: Buffer overflow, limit of <buf_limit> bytes.
ORA-20000, ORU-10028: Line length overflow, limit of 32767 bytes for each line

Usage Notes
1)You can build a line of information piece by piece by making multiple calls to PUT, or place an entire line of information into the buffer by calling PUT_LINE.
2)When you call PUT_LINE the item you specify is automatically followed by an end-of-line marker. If you make calls to PUT to build a line, then you must add your own end-of-line marker by calling NEW_LINE. GET_LINE and GET_LINES do not return lines that have not been terminated with a newline character.
3)If your lines exceeds the line limit, you receive an error message.
4)Output that you create using PUT or PUT_LINE is buffered. The output cannot be retrieved until the PL/SQL program unit from which it was buffered returns to its caller.
For example, SQL*Plus does not display DBMS_OUTPUT messages until the PL/SQL program completes. There is no mechanism for flushing the DBMS_OUTPUT buffers within the PL/SQL program. For example:

SQL> SET SERVEROUTPUT ON
SQL> BEGIN
   2 DBMS_OUTPUT.PUT_LINE (‘hello’);
   3 DBMS_LOCK.SLEEP (10);
   4 END;

      很显然当我们在输出时,控制输出结果的缓冲大小由DBMS_OUTPUT.ENABLE控制,buffer size默认为20000,每行最大的限制是32k,后面的一个例子是用来说明存储过程是在缓存了所有数据后才将结果返回。所以当我们使用游标进行输出 时,如果结果很多,将会超过这个值报ORA-20000, ORU-10027: Buffer overflow, limit of <buf_limit> bytes这个错误
解决方法:
在存储过程begin后面加 :  DBMS_OUTPUT.ENABLE (buffer_size=>null)     表示没有限制



本文转自左正博客园博客,原文链接:http://www.cnblogs.com/soundcode/archive/2012/01/31/2332642.html,如需转载请自行联系原作者

目录
相关文章
|
4月前
|
JSON PHP 数据格式
PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes)
PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes)
75 2
|
7月前
|
SQL 关系型数据库 MySQL
mysql:1153 Got a packet bigger than ‘max_allowed_packet’ bytes的解决方法
mysql:1153 Got a packet bigger than ‘max_allowed_packet’ bytes的解决方法
106 0
|
Java 应用服务中间件
【异常】The field file exceeds its maximum permitted size of 1048576 bytes.
【异常】The field file exceeds its maximum permitted size of 1048576 bytes.
165 0
|
存储 缓存 大数据
Starrocks执行查询报错:Memory of process exceed limit. Used: XXX, Limit: XXX. Mem usage has exceed the limit of BE
Starrocks执行查询报错:Memory of process exceed limit. Used: XXX, Limit: XXX. Mem usage has exceed the limit of BE
|
Java Spring
The field file exceeds its maximum permitted size of 1048576 bytes 文件上传大小受到限制,报错!!
The field file exceeds its maximum permitted size of 1048576 bytes 文件上传大小受到限制,报错!!
750 0
|
SQL 关系型数据库 MySQL
postgre分页查询报错:ERROR: LIMIT #,# syntax is not supported 建议:Use separate LIMIT and OFFSET clauses
postgre分页查询报错:ERROR: LIMIT #,# syntax is not supported 建议:Use separate LIMIT and OFFSET clauses
376 0
postgre分页查询报错:ERROR: LIMIT #,# syntax is not supported 建议:Use separate LIMIT and OFFSET clauses
|
Java 应用服务中间件
The field file exceeds its maximum permitted size of 1048576 bytes.
The field file exceeds its maximum permitted size of 1048576 bytes.
|
前端开发 Java 关系型数据库
记录:The field files exceeds its maximum permitted size of 1048576 bytes...【亲测有效】
记录:The field files exceeds its maximum permitted size of 1048576 bytes...【亲测有效】
1136 0
|
关系型数据库 MySQL Java
Connection is read-only. Queries leading to data modification are not allowed
看了下mysql-connector-5.1.40版本中,如果设置failoverReadOnly=true (即默认值,参考链接),当mysql连接failover时,会根据jdbc连接串将当前连接的readOnly值设置为true (第8行代码) 1 2 3 4 ...
3429 0