Print Thread
Problem with DBMS_OUTPUT
#35671 09/24/09 05:52 AM
Joined: Sep 2009
Posts: 3
P
Member
OP Offline
Member
P
Joined: Sep 2009
Posts: 3
Hi PL \ SQL Developer Experts,
I work in PL/SQL developer version 7.1.5.1398 connecting to Oracle 10.2.0.1.0

The following snippet works fine

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

But the following snippet fails

DECLARE
l_text VARCHAR2(4001) := rpad('1', 4001, '1');
BEGIN
dbms_output.put_line(l_text);
END;

with the error message
ora-06502: PL/SQL : numeric or value error:character string buffer too small
ora-06512: at "sys.dbms_output", line 148
ora-06512: at line 2

Though the PL-SQL character can support upto 32767 chanracters, why pl/sql developer is not supporting more than 4000, which is the maximum size of varchar in a table.

Is this a limitation of pl/sql developer tool or i am missing some options to be set? I have tried setting the buffer size to a big value (100000).

Regards,
Prasath N.



Re: Problem with DBMS_OUTPUT
prasath n #35682 09/24/09 10:36 AM
Joined: Aug 1999
Posts: 22,218
Member
Offline
Member
Joined: Aug 1999
Posts: 22,218
This is a limitation of the sys.dbms_output package.


Marco Kalter
Allround Automations
Re: Problem with DBMS_OUTPUT
Marco Kalter #35700 09/25/09 05:25 AM
Joined: Sep 2009
Posts: 3
P
Member
OP Offline
Member
P
Joined: Sep 2009
Posts: 3
Hi Marco,
Thanks for your reply.

Still I have a clarification.

Starting with 10g R2, Oracle lifted these restrictions. Line limit is extended to 32767 bytes from 255 bytes. Also, by default, buffer limit is set to unlimited. When

Re: Problem with DBMS_OUTPUT
prasath n #35704 09/25/09 09:19 AM
Joined: Aug 1999
Posts: 22,218
Member
Offline
Member
Joined: Aug 1999
Posts: 22,218
I assumed the error occurred when calling dbms_output.put_line, but apparently this occurs when fetching a line. We'll fix it.


Marco Kalter
Allround Automations

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.052s Queries: 14 (0.008s) Memory: 2.5092 MB (Peak: 3.0423 MB) Data Comp: Off Server Time: 2024-05-15 05:48:20 UTC
Valid HTML 5 and Valid CSS