cx_Oracle issues

Hrvoje Niksic hniksic at
Mon Dec 15 10:51:49 CET 2008

huw_at1 <huwdjones at> writes:

>> > ORA-06502: PL/SQL: numeric or value error: character string buffer too
>> > small ORA-06512: at line 1
>> This error is a problem with the PL/SQL, not cx_Oracle.  You need to
>> debug obj.function to see what kind of data is being accessed and then
>> a data analysis of that data to understand why this error occurs.  I
>> can tell you the function is most likely expecting characters from a
>> column that are numeric [0 .. 9] and is getting alpha characters.
> Hi thanks for the responses. Unfortunately the procedure in question
> is from a third party vendor so I can't really debug it so I'd say I
> was fairly stumped. Just out of interest how do you increase the
> output buffer size with cx_Oracle?

Ron's point was that you cannot fix this problem on the side of
cx_Oracle because the exception occurs before cx_Oracle ever sees the
result, during the execution of PL/SQL code.

This is easy to verify: simply run the function the same way in
sqlplus.  If the problem persists, it's a bug in the function (or in
the way you're calling it, or setting up the data, etc.) and you
should complain to your vendor, or somehow work around the problem.
Otherwise it's a cx_Oracle related problem.

More information about the Python-list mailing list