How to increase dbms_output buffer?(如何增加 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 指定不应有限制.最大大小为 1,000,000,当用户指定 buffer_size (NOT NULL) 时,最小为 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 缓冲区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何增加 dbms_output 缓冲区?
基础教程推荐
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
- 是否可以执行按位分组功能? 2021-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- 无法解决整理冲突 2021-01-01
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- 在 SQL 中连接多个表 2021-01-01
