Re: [DBD::Oracle] ORA-02005 on array insert

"Martin J. Evans" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Organization Easysoft Limited
Message-ID <[email protected]>
On 20/03/12 12:12, Peter J. Holzer wrote:
> A few months ago we upgraded two of our servers from RHEL 4 to RHEL6.
> Unfortunately the upgrade involved the OS, the Perl version (5.8.8 ->
> 5.10.1), the Oracle client version (still 10g, but now instant client)
> and DBD::Oracle (1.19 ->  1.30 (now 1.38)), and we didn't note the
> problem at once, so it's unclear which of the many changes is the
> culprit, but I suspect it's a bug in DBD::Oracle.
>
> Anyway, since the upgrade sometimes (not always) array inserts returned
> the error
>
>      DBD::Oracle::st execute_array failed: ORA-02005: implicit (-1)
>      length not valid for this bind or define datatype (DBD ERROR:
>      OCIBindByName)
>
> Here is a test script which semi-reliably (>= 50% of the time) produces
> the error message:
>
>

<snipped script>

>
> Some notes:
>
> ARGV[0] is supposed to be the name of a file containing space-separated
> connect data, e.g.:
> dbi:Oracle:ORCL scott tiger
>
> When the script fails, it always fails on the second iteration of the
> loop. If it gets through the second iteration it completes all 1000
> iterations successfully.
>
> When the call to prepare_cached is replaced by a simple prepare, the
> script fails less often.
>
> I have run the script with DBI_TRACE=4, but I don't see any significant
> difference between successful and unsuccessful runs.
>
>          hp
>

I've run this a couple of dozen times and it never has failed for me. I was using Linux Ubuntu 10.10, Perl 5.10.1 (with threads), DBD::Oracle (from subversion trunk) and Oracle Instant Client 11.2.

Martin
-- 
Martin J. Evans
Easysoft Limited
http://www.easysoft.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.