如何增加dbms_output缓冲区? [英] How to increase dbms_output buffer?

查看:660
本文介绍了如何增加dbms_output缓冲区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过dbms_output调试动态查询,但是对于dbms_output缓冲区来说,查询字符串似乎太长.

I tried to debug my dynamic query via dbms_output but seems like the query string is too long for dbms_output buffer.

我得到了:

ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "SYS.DBMS_OUTPUT", line 148
ORA-06512: at line 1 

有什么想法增加缓冲区大小吗?

Any idea how to increase the buffer size ?

推荐答案

您可以启用DBMS_OUTPUT并设置缓冲区大小.缓冲区大小可以在1到1,000,000之间.

You can Enable DBMS_OUTPUT and set the buffer size. The buffer size can be between 1 and 1,000,000.

dbms_output.enable(buffer_size IN INTEGER DEFAULT 20000);
exec dbms_output.enable(1000000);

检查

Check this

编辑

根据Frank和Mat发表的评论,您还可以使用Null启用它

As per the comment posted by Frank and Mat, you can also enable it with Null

exec dbms_output.enable(NULL);

buffer_size :缓冲信息的上限(以字节为单位).将buffer_size设置为NULL可以指定没有限制.当用户指定buffer_size(NOT NULL)时,最大大小为1,000,000,最小为2,000.

buffer_size : Upper limit, in bytes, the amount of buffered information. Setting buffer_size to NULL specifies that there should be no limit. The maximum size is 1,000,000, and the minimum is 2,000 when the user specifies buffer_size (NOT NULL).

这篇关于如何增加dbms_output缓冲区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆