On Tue Jan 18 15:13:23 2011, MJEVANS wrote:
Show quoted text> On Tue Jan 18 09:33:12 2011, dflewelling wrote:
> > On Tue Jan 18 04:30:38 2011, MJEVANS wrote:
> > > On Fri Jan 14 11:43:21 2011, dflewelling wrote:
> > > > On Thu Jan 13 15:13:47 2011, dflewelling wrote:
> > > > > AIX 6.1.0.0
> > > > > Perl: v5.8.8 built for aix-thread-multi
> > > > > DBI Version:1.613
> > > > > DBD::Oracle: 1.24
> > > > > Oracle: 10.2.0.3
> > > > >
> > > > > DBD Oracle seems to get corrupted if I am switching back/forth
> > > > between
> > > > > an ODBC connection and Oracle connection.
> > > > >
> > > > > for example: I have a connection to an ODBC (netezza) database
> > and
> > > > > Oracle database.
> > > > >
> > > > > I can prepare and execute a statement against the ODBC
> > connection,
> > > > but
> > > > > when I try to prepare a subsequent statement against the
Oracle
Show quoted text> > > > > database, I get the following error:
> > > > >
> > > > > ORA-24373: invalid length specified for statement (DBD ERROR:
> > > > > OCIStmtPrepare) [for Statement "SELECT * FROM EXTRACT_ATTR"]
> > > > >
> > > > > However, if I reverse the order of the statements (e.g. Oracle
> > first
> > > > > and ODBC second), both work fine.
> > > > >
> > > > additional information:
> > > > as long as I prepare a statement against Oracle FIRST,
everything
Show quoted text> > seems
> > > > to work fine...
> > > >
> > >
> > > The only time I've seen this is when two connections use different
> > > shared objects but both contain the same symbol e.g., using
DBD::ODBC
Show quoted text> > > with any ODBC driver and DBD::DB2 with their cli driver (they both
> > > contain SQLxxx fns). The solution in that case was to set
> > > PERL_DL_NONLAZY and export it before running the script.
> > >
> > > Martin
> >
> > Thanks for the suggestion. I just tried that and it made no
> > difference. any ideas what code I should be looking at ? (I'm
fairly
Show quoted text> > new to perl and not sure where to start looking...)
> >
> > Thanks
> > Dwight
> >
>
> I'm not saying it is definitely what I described but the only time
I've
Show quoted text> seen it was when 2 libs under DBDs exported the same symbols in shared
> objects (.a files on AIX containing shared objects). If you set
> PERL_DL_NONLAZY and it did not make the problem go away them /maybe/
it
Show quoted text> is a different issue. We discovered it by running nm on the libs used
by
Show quoted text> the Perl DBDs and seeing they exported the same symbols.
PERL_DL_NONLAZY
Show quoted text> changes the way symbols are resolved (downwards) in groups.
>
> I've not got all of your databases so I cannot reproduce here and help
> diagnose - you may be on your own :-(
>
> Martin
Did you get anywhere with this? Can we close this rt now?
Martin
--
Martin J. Evans
Wetherby, UK