错误提示:

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

例如:

DECLARE
  Message varchar(1000);
BEGIN
  Message:='';
  DBMS_OUTPUT.ENABLE (buffer_size=>null) ;
  FOR C_TAB IN (SELECT TABLE_NAME FROM ALL_TABLES) LOOP
    Message:= C_TAB.TABLE_NAME;
    dbms_output.put_line(Message); 
  END LOOP;

END;

转载于:https://blog.51cto.com/cswggod/1021867

ORU-10027: buffer overflow, limit of 10000 bytes相关推荐

  1. ORA-20000:ORU-10027:buffer overflow,limit of 10000 bytes 解决方法

    ORACLE 执行存储过程时, 的时候,报 ORA-20000:ORU-10027:buffer overflow,limit of 10000 bytes. 问题原因:过程中含有dbms_outpu ...

  2. plsql报错,缓存超限制(ORA-20000:ORU-10027:buffer overflow,limit of 10000 bytes) 解决方法

    用plsql执行存储过程时,总喜欢output一些信息,动态获取一些信息,看中间过程是否正确,但输出缓冲区默认大小是10000bytes,输出信息太多会报错: ORA-20000:ORU-10027: ...

  3. ORA-20000: ORU-10027: buffer overflow, limit of 10000 bytes

        要用dbms_output.put_line来输出语句,遇到以下错误: ERROR 位于第 1 行: ORA-20000: ORU-10027: buffer overflow, limit ...

  4. ORA-20000:ORU-10027:buffer overflow,limit of 10000 bytes错误4

    今天再测试一个存储过程时,用DBMS_OUTPUT.PUT_LINE输出时,报 ORA-20000:ORU-10027:buffer overflow,limit of 10000 bytes SQL ...

  5. 调试存储过程时提示ORA-20000: ORU-10027: buffer overflow, limit of 10000 bytes

    下午的时候在 PL/SQl Developer 10.0.5.1710 上调试壹個存储过程,在调试的时候使用了比较多的 DBMS_OUTPUT.PUT_LINE 作为打印日志的方式,结果没过多久 PL ...

  6. ORU-10027:buffer overflow,limit of 10000 bytes问题的解决

    ORA-20000: ORU-10027: buffer overflow, limit of 10000 bytes问题的解决: 方法1:set serveroutput on size 10000 ...

  7. 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 & ...

  8. ORA-20000:ORU-10027:buffer overflow,limit of 10000 bytes

    解决方案: 在plsql中编辑存储过程时,存储过程中的begin-end中,begin后面直接加上DBMS_OUTPUT.ENABLE(buffer_size => null) ,表示输出buf ...

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

    要用dbms_output.put_line来输出语句,遇到以下错误: begin user_priv (username => 'hr'); end; ORA-20000: ORU-10027 ...

最新文章

  1. Java绘制基本图形
  2. python怎么安装包-怎么安装python包
  3. Inside Dynamics Axapta源代码赏析(五)
  4. LeetCode题库整理【Java】—— 1两数之和
  5. 如何将android连接到pc,如何将Android屏幕镜像到PC
  6. mysql 杂记(二)
  7. 小白一枚。。。记录下这种构造函数
  8. Paypal开源nodejs框架研究(二)KrakenJs之Enrouten
  9. 图像处理MATLAB(图像分割)
  10. JS保留小数 去尾法 进一法 四舍五入法
  11. HITB 2020:二进制漏洞挖掘仍是会议主流方向
  12. Springboot连接Redis超时问题解决
  13. 译后访谈《Scratch少儿趣味编程》作者阿部和广
  14. python读取 xls,xlsx,csv,doc,docx,pdf 格式的文件
  15. 走查是什么意思啊?如何给原稿进行走查?
  16. 这届90后女博士,对30岁不屑一顾
  17. 思科交换机如何配置Trunk?
  18. python 宏定义函数_python 宏使用详解
  19. ZZULIOJ 1795 爱吃薯片的寒聚聚
  20. 通用技术设计评价雷达图高考必看知识点

热门文章

  1. ceph auth get_服装百科|get到羽绒服的“绒”干货,你就能做好设计
  2. oracle数据库gold,Oracle数据库之Oracle GoldenGate 12.2.0.1 安装、升级和删除
  3. mate40能更新鸿蒙,Mate40领衔更新!鸿蒙系统首批升级机型名单:这些机型可坐等推送...
  4. Verilog设计实例(6)基于Verilog的各种移位寄存器实现
  5. js原理之执行上下文
  6. MeterialDesign系列文章(一)ToolBar的使用
  7. MySQL主主复制搭建教程收集(待实践)
  8. Spring MVC 解读——mvc:annotation-driven/
  9. 2. VS使用---HelloWorld
  10. 宁可寸寸断,不意绕指柔