博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
PLSQL Developer 出现ORU-10027: buffer overflow, limit of 10000 bytes
阅读量:5280 次
发布时间:2019-06-14

本文共 1897 字,大约阅读时间需要 6 分钟。

错误提示:

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)     表示没有限制

转载于:https://www.cnblogs.com/soundcode/archive/2012/01/31/2332642.html

你可能感兴趣的文章
python学习笔记 day44 mysql练习题(三)
查看>>
c# 使用ICSharpCode.SharpZipLib.dll实现文件压缩并返回
查看>>
【Laravel】 常用的artisan命令
查看>>
Qt 中获取本机IP地址
查看>>
基本数据类型(int, bool, str)
查看>>
070102_赌博设计:概率的基本概念,古典概型
查看>>
IT人生的价值和意义 感觉真的有了
查看>>
Linux命令之df
查看>>
BaseActivity--上门啦
查看>>
JS DOM对象
查看>>
python正则表达式
查看>>
OGR – Merging Multiple SHP files
查看>>
滴滴快车奖励政策,高峰奖励,翻倍奖励,按成交率,指派单数分级(10月17日~10月23日)...
查看>>
创业公司该不该被收购?(转)
查看>>
sqlserver 行转列、列转行[转]
查看>>
【IScroll深入学习】解决IScroll疑难杂症
查看>>
lua io
查看>>
day54
查看>>
运行Jar包程序Shell
查看>>
Python Code snippet
查看>>