解決 plsql dev中ORA-20000 ORU-10027 buffer overflow, limit of 2000 bytes 問題

cnhtm發表於2010-03-12

在plsql dev中使用dbms_output.put_line的時候報如下錯誤

ORA-20000: ORU-10027: buffer overflow, limit of 2000 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 line 5

詳細日誌如下:

[@more@]
SQL>
SQL> set serveroutput on;
SQL> begin
2 for c in (select * from dba_objects)
3 loop
4 dbms_output.put_line(c.object_name);
5 end loop;
6 end;
7 /

ICOL$
I_USER1

... ...

I_SNAP_REFTIME1
MLOG_REFCOL$

begin
for c in (select * from dba_objects)
loop
dbms_output.put_line(c.object_name);
end loop;
end;

ORA-20000: ORU-10027: buffer overflow, limit of 2000 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 line 5

SQL>

解決方法如下:

SQL> exec dbms_output.enable(9999999999);

PL/SQL procedure successfully completed

SQL>
SQL> begin
2 for c in (select * from dba_objects)
3 loop
4 dbms_output.put_line(c.object_name);
5 end loop;
6 end;
7 /

ICOL$
I_USER1
CON$
UNDO$

... ...

WRH$_SYS_TIME_MODEL
WRH$_SYS_TIME_MODEL_PK
WRH$_SYS_TIME_MODEL_PK
WRH$_SERVICE_WAIT_CLASS
WRH$_SERVICE_WAIT_CLASS_PK
WRH$_SERVICE_WAIT_CLASS_PK
BIG_TABLE
P_TEST

PL/SQL procedure successfully completed

SQL>

--end--

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22049049/viewspace-1031882/,如需轉載,請註明出處,否則將追究法律責任。

相關文章