Error Message Truncated On Client-Side After 1024 Bytes (Doc ID 1364727.1)

Last updated on JULY 05, 2017

Applies to:

PL/SQL - Version: 11.2.0.1 to 11.2.0.2 - Release: 11.2 to 11.2
Information in this document applies to any platform.

Symptoms


=== ODM Issue Clarification ===

Error messages are truncated on the client-side after 1024 bytes
instead of 2048 Bytes as documented in

Oracle® Database PL/SQL User's Guide and Reference
10g Release 2 (10.2)

"To call RAISE_APPLICATION_ERROR, use the syntax

raise_application_error(
error_number, message[, {TRUE | FALSE}]);

where error_number is a negative integer in the range -20000 .. -20999 and message is a character string up to 2048 bytes long."

Please see the following code:


**********
set serveroutput on

drop table testx1;
create table testx1 (col1 varchar2(2050));

declare
s varchar2(2050);
begin
s:= lpad('y',2048,'1234567890');
dbms_output.put_line(length(s));
insert into testx1 (col1) values (s);
commit;
raise_application_error(-20300, s);
end;
/
select * from testx1;
select length(col1) from testx1;
**********


Output:
-------
2048
declare
*
ERROR at line 1:
ORA-20300:
123456789012345678901234567890123456789012345678901234567890123456789012345678
90
123456789012345678901234567890123456789012345678901234567890123456789012345678
90
123456789012345678901234567890123456789012345678901234567890123456789012345678
90
123456789012345678901234567890123456789012345678901234567890123456789012345678
90
123456789012345678901234567890123456789012345678901234567890123456789012345678
90
123456789012345678901234567890123456789012345678901234567890123456789012345678
90
123456789012345678901234567890123456789012345678901234567890123456789012345678
90
123456789012345678901234567890123456789012345678901234567890123456789012345678
90
123456789012345678901234567890123456789012345678901234567890123456789012345678
90
123456789012345678901234567890123456789012345678901234567890123456789012345678
90
123456789012345678901234567890123456789012345678901234567890123456789012345678
90
123456789012345678901234567890123456789012345678901234567890123456789012345678
90
1234567890123456789012345678901234567890123456789012

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms