ORA-20000:ORU-10027:buffer overflow,limit of 2000 bytes.
2016-03-22 15:16
423 查看
ORA-20000:ORU-10027:buffer overflow,limit of 2000 bytes.
这是因为在过程中用到了dbms_output.put_line()在服务器端输出信息,而serveroutput 的size默认定义为10000bytes。
修改一下size应该就可以了
set serveroutput on 30000
ORA-20000 string
Cause:The stored procedure RAISE_APPLICATION_ERROR was called which causes this error to be generated.
Action:Correct the problem as described in the error message or contact the application administrator or database administrator for more information.
===============================================
写存储过程时遇到一个问题,执行dbms_output.putline(变量名)的时候,报错
ORA-20000:ORU-10027:buffer overflow,limit of 2000 bytes.
$ oerr ora 20000
20000, 00000, "%s"
// *Cause: The stored procedure 'raise_application_error'
// was called which causes this error to be generated.
// *Action: Correct the problem as described in the error message or contact
// the application administrator or DBA for more information.
应该是变量大小超过了dbms_output.putline的最大值。
解决办法:
SQL>set serveroutput on size 1000000
##2014-07-18添加
解决办法2:
在begin后面加上DBMS_OUTPUT.ENABLE(buffer_size => null) ,表示输出buffer不受限制。
如下面的语句是为了获取创建索引语句
set serveroutput on
declare
v_sql varchar2(1000);
v_result varchar2(2000);
begin
for cur_sql in (select 'select dbms_metadata.get_ddl(''INDEX'',''' ||
T.INDEX_NAME || ''',''XXXX'') FROM DUAL' as f_sql
from v$object_usage t
where t.monitoring = 'YES'
AND T.USED = 'NO') loop
begin
DBMS_OUTPUT.ENABLE(buffer_size => null); --表示输出buffer不受限制
execute immediate cur_sql.f_sql
into v_result;
--DBMS_OUTPUT.PUT_LINE(cur_sql.f_sql);
DBMS_OUTPUT.PUT_LINE(v_result);
end;
end loop;
end;
/
这是因为在过程中用到了dbms_output.put_line()在服务器端输出信息,而serveroutput 的size默认定义为10000bytes。
修改一下size应该就可以了
set serveroutput on 30000
ORA-20000 string
Cause:The stored procedure RAISE_APPLICATION_ERROR was called which causes this error to be generated.
Action:Correct the problem as described in the error message or contact the application administrator or database administrator for more information.
===============================================
写存储过程时遇到一个问题,执行dbms_output.putline(变量名)的时候,报错
ORA-20000:ORU-10027:buffer overflow,limit of 2000 bytes.
$ oerr ora 20000
20000, 00000, "%s"
// *Cause: The stored procedure 'raise_application_error'
// was called which causes this error to be generated.
// *Action: Correct the problem as described in the error message or contact
// the application administrator or DBA for more information.
应该是变量大小超过了dbms_output.putline的最大值。
解决办法:
SQL>set serveroutput on size 1000000
##2014-07-18添加
解决办法2:
在begin后面加上DBMS_OUTPUT.ENABLE(buffer_size => null) ,表示输出buffer不受限制。
如下面的语句是为了获取创建索引语句
set serveroutput on
declare
v_sql varchar2(1000);
v_result varchar2(2000);
begin
for cur_sql in (select 'select dbms_metadata.get_ddl(''INDEX'',''' ||
T.INDEX_NAME || ''',''XXXX'') FROM DUAL' as f_sql
from v$object_usage t
where t.monitoring = 'YES'
AND T.USED = 'NO') loop
begin
DBMS_OUTPUT.ENABLE(buffer_size => null); --表示输出buffer不受限制
execute immediate cur_sql.f_sql
into v_result;
--DBMS_OUTPUT.PUT_LINE(cur_sql.f_sql);
DBMS_OUTPUT.PUT_LINE(v_result);
end;
end loop;
end;
/
相关文章推荐
- jQuery插件开发
- 剑指offer 3 从尾到头打印链表
- 浅谈HTML5 WebSocket的机制
- H5 - 音频视频标签的使用
- React Native学习笔记-1:JSC profiler is not supported.
- js中判断两个对象
- CSS中你可能不知道的单位
- 图解nio bytebuffer
- CSS选择器及CSS3新增选择器
- [Angularjs]锚点操作服务$anchorScroll
- React Native 红屏之Could not connect to development server.
- js中cookie的学习与使用
- CSS从大图中抠取小图完整教程(background-position应用)
- seajs 入门
- Javascript中Base64编码解码的使用实例
- jQuery中Ajax事件beforesend及各参数含义1
- js中如何定义常量
- 10、前端代码规范(转载)
- jQuery中Ajax事件beforesend及各参数含义
- jsapi 调用创建企业会话和企业通讯录