Print Thread
Page 1 of 2 1 2
DBMS_OUTPUT.PUT_LINE with 4000 Characters ERROR
#38358 07/05/10 06:34 PM
Joined: Mar 2009
Posts: 32
M
mamv Offline OP
Member
OP Offline
Member
M
Joined: Mar 2009
Posts: 32
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

Re: DBMS_OUTPUT.PUT_LINE with 4000 Characters ERROR
mamv #38362 07/06/10 09:01 AM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
We'll fix it.


Marco Kalter
Allround Automations
Re: DBMS_OUTPUT.PUT_LINE with 4000 Characters ERROR
Marco Kalter #38722 09/09/10 04:15 PM
Joined: Mar 2010
Posts: 10
Austin, TX
S
Member
Offline
Member
S
Joined: Mar 2010
Posts: 10
Austin, TX
We found a similar issue. We found by uninstalling 8.0.4 and installing 8.0.1 the issue was resolved.

Re: DBMS_OUTPUT.PUT_LINE with 4000 Characters ERROR
sdufour #40023 04/28/11 09:59 PM
Joined: Apr 2011
Posts: 4
C
Member
Offline
Member
C
Joined: Apr 2011
Posts: 4
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.

Re: DBMS_OUTPUT.PUT_LINE with 4000 Characters ERROR
capk #40025 04/29/11 10:10 AM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
Can you try this fix?


Marco Kalter
Allround Automations
Re: DBMS_OUTPUT.PUT_LINE with 4000 Characters ERROR
Marco Kalter #40026 04/29/11 07:07 PM
Joined: Apr 2011
Posts: 4
C
Member
Offline
Member
C
Joined: Apr 2011
Posts: 4
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)

Re: DBMS_OUTPUT.PUT_LINE with 4000 Characters ERROR
capk #40028 05/02/11 09:33 AM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
We'll check it out.


Marco Kalter
Allround Automations
Re: DBMS_OUTPUT.PUT_LINE with 4000 Characters ERROR
Marco Kalter #40039 05/03/11 12:49 PM
Joined: Dec 2009
Posts: 7
R
Member
Offline
Member
R
Joined: Dec 2009
Posts: 7
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

Re: DBMS_OUTPUT.PUT_LINE with 4000 Characters ERROR
Romci #40043 05/04/11 08:33 AM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
Okay, thanks.


Marco Kalter
Allround Automations
Re: DBMS_OUTPUT.PUT_LINE with 4000 Characters ERROR
Marco Kalter #40047 05/04/11 06:52 PM
Joined: Apr 2011
Posts: 4
C
Member
Offline
Member
C
Joined: Apr 2011
Posts: 4
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


Page 1 of 2 1 2

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.060s Queries: 16 (0.031s) Memory: 2.5602 MB (Peak: 3.0405 MB) Data Comp: Off Server Time: 2024-05-21 00:08:00 UTC
Valid HTML 5 and Valid CSS