DBMS_OUTPUT.PUT_LINE with 4000 Characters ERROR

mamv

Member²
Hi,

I found a problem when trying to output a variable of VARCHAR2(4000).

Example:

CREATE TABLE teste as
select lpad('A',4000,'A') text from dual;

-- I changed the buffer size in PL/SQL Developer to 10000000

When I run this code:


Code:
DECLARE
  l_text VARCHAR2(4000);
BEGIN
  dbms_output.enable(NULL);
  SELECT text
    INTO l_text
    FROM teste;
  dbms_output.put_line(l_text);
END;

I always get the error: ORA-06502: PL/SQL: numeric or value error: character string buffer too small.

After some testing, I found out that the sweetspot is at 1333 A. If I use 1334 I get the error.

If I run the same code in TOAD, it outputs the correct result without errors.

Could you please fix this problem.

Thanks in advance,
Manuel Vidigal
 
Has this been fixed yet with 8.0.4.1414? I've encountered the exact same problem and would like to avoid having to down grade to 8.0.1.
 
I downloaded the patch and installed to Version 8.0.4.1522. It didn't help the issue. In fact I think we went backwards. My execute button and other icons, normally below the Menu Bar, are now gone. Wondering what to do next? To give more info here is the full version information:

PL/SQL Developer
Version 8.0.4.1522
01.68687 - 1 user license
Windows 7 (64-bit) 6.1 Build 7601 (Service Pack 1)

Physical memory : 4,194,304 kB (4,194,304 available)
Paging file : 4,194,304 kB (4,194,304 available)
Virtual memory : 2,097,024 kB (1,894,584 available)
 
Hi, if it helps, I tried it myself and found that it works fine when connecting to a 10g database, but fails when connected to 11g database.

V$VERSIONS:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
 
I'm connecting to a 10g database, but I'm using the 11g client.

1 Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
2 PL/SQL Release 10.2.0.4.0 - Production
3 CORE 10.2.0.4.0 Production
4 TNS for Linux: Version 10.2.0.4.0 - Production
5 NLSRTL Version 10.2.0.4.0 - Production

 
Back
Top