Problem with DBMS_OUTPUT.Put_Line (again)

B_P_100

Member²
Hi,

A long time ago a user posted a message on this topic.

#35671 - 09-24-2009 01:52 Problem with DBMS_OUTPUT

He was using an earlier version of PL/SQL Developer and Oracle.

I am using

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0
with
PL/SQL Developer
Version 9.0.0.1601
Windows 7 (64-bit) 6.1 Build 7601 (Service Pack 1)

The original user created two very simple test cases.

-- this succeeds
DECLARE
l_text VARCHAR2(4000) := rpad('1', 4000, '1');
BEGIN
dbms_output.put_line('test succeeds');
dbms_output.put_line(l_text);
END;

-- this fails with following error message
DECLARE
l_text VARCHAR2(4001) := rpad('1', 4001, '1');
BEGIN
dbms_output.put_line('test fails');
dbms_output.put_line(l_text);
END;

The error message is:

ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at 'SYS.DBMS_OUTPUT', line 151
ORA-06512: at line 2

It seems like this was corrected four years ago in an earlier
version of the product but the problem may have reappeared?

Could you tell me if this issue is present on your version 10?
I'm thinking about upgrading and this might be an incentive.
Or alternatively was this noted and fixed in a later patch
of your version 9?

Thanks, Brian
 
Back
Top