My Oracle Support Banner

ORA-20000 ORU-10027 Using DBMS_OUTPUT Procedure (Doc ID 1034353.6)

Last updated on NOVEMBER 13, 2019

Applies to:

PL/SQL - Version and later
Oracle Database - Enterprise Edition - Version 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***


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.

The following example demonstrates the error.

1 - Create the stored procedure.

create or replace procedure blowup as
   i number;
   for i in 1..2000 loop
   end loop;

2 - Execute the procedure

SQL> execute blowup

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

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


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

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.