Re: PL SQL Error

From: Malcolm Dew-Jones <>
Date: 11 Dec 2009 11:20:11 -0700
Message-ID: <4b229b6b$>

The Magnet ( wrote:
: This one is kind of confusing. The max length of a VARCHAR2 is
: 4000. So, I call a stored procedure passing is a value that is 3278
: characters long, basically text. I receive an error:

: SP2-0027: Input is too long (> 2499 characters)

: If I code that into a variable inside some code, same thing.

: Breaking it up is not really an option since it is being called some a
: PHP application. But, if 4000 is the max, why is it complaining at
: 3000????

I would google this error, there are lots of hits on it.  Note the error 
is not an oracle error per-se (ORA-) but something else.

I assume that php uses some kind of interface to get to oracle, it is
possible that the maximum is something defined in that.  One googlee was
using sqlplus and their line was too long for that tool (and they got that
error), so I might guess something similar for you with php.

Also, perhaps the php code is sending multiple bytes per character
(utf-8). Then the number of characters and bytes will not be the same, so
(for example, these are not your numbers) a 2000 character string will be
greater than 2000 bytes (and so not fit into a varchar2(2000).

Also max length of a VARCHAR2 is not 4000 except as a column in the
database, in pl/sql it is much longer, as just discussed in another
Received on Fri Dec 11 2009 - 12:20:11 CST

Original text of this message