ORA-20000 ORU-10027 Using DBMS_OUTPUT Procedure
(Doc ID 1034353.6)
Last updated on NOVEMBER 13, 2019
Applies to:
PL/SQL - Version 9.2.0.8 and laterOracle Database - Enterprise Edition - Version 9.2.0.8 and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.
***Checked for relevance on 14-Jun-2017***
Symptoms
When running a procedure that uses DBMS_OUTPUT an ORA-20000 and an ORU-10027 error may return even if serveroutput was not enabled in SQL*Plus.
ORA-20000: <application_specific_message>
Cause: The stored procedure RAISE_APPLICATION_ERROR was called,
which causes this message to be generated.
Action: Correct the problem as described in the message or contact
the application administrator or database administrator
for more information.
Cause: The stored procedure RAISE_APPLICATION_ERROR was called,
which causes this message to be generated.
Action: Correct the problem as described in the message or contact
the application administrator or database administrator
for more information.
The following example demonstrates the error.
1 - Create the stored procedure.
create or replace procedure blowup as
i number;
begin
for i in 1..2000 loop
dbms_output.put_line('123456789012345678901234567890123456789012345');
end loop;
end;
/
i number;
begin
for i in 1..2000 loop
dbms_output.put_line('123456789012345678901234567890123456789012345');
end loop;
end;
/
2 - Execute the procedure
SQL> execute blowup
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
3 - This enables the output and shows the serveroutput is off.
SQL> execute dbms_output.enable(2000);
PL/SQL procedure successfully completed.
SQL> show serveroutput
serveroutput OFF
PL/SQL procedure successfully completed.
SQL> show serveroutput
serveroutput OFF
4 - The following executes the procedure and produces the error.
SQL> execute blowup
BEGIN blowup; END;
*
ERROR at line 1:
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 "T1.BLOWUP", line 5
ORA-06512: at line 1
BEGIN blowup; END;
*
ERROR at line 1:
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 "T1.BLOWUP", line 5
ORA-06512: at line 1
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |