Can't connect to Oracle 9i when connected to DB2

From: David A Mullen (DMULLEN_at_amfam.com)
Date: 11/01/04


Date: Mon, 1 Nov 2004 12:55:18 -0600
To: <dbi-users@perl.org>

Hi all,

We're having a strange problem with a number of perl scripts we use to
verify the synchronization of an Oracle database with a DB2 database.
We're running perl 5.8.5 on HP-UX 11 (had to do our own compile; used
gcc). DBI version is 1.45, DBD::Oracle is 1.16 (client version 9.2.0.5),
DBD::DB2 is 0.78 (client version 7.2 (version 7 fixpack 12)).

If I first do DBI->connect() to the Oracle 9i database, and then to DB2
(without retrieving data from either, but having prepared some
statements), it works fine. However, if I set up the DB2 $dbh and
statements first, I get a core dump when I try to open the Oracle
connection. It also works fine if I connect to an Oracle 8i version of
the database (using all the same perl and client components), rather
than the 9i version.

I stepped through my program in perl -d, and the debugger hangs when it
attempts to execute DBD::Oracle::db::_login(); I assume this is the
point at which it dumps core when running without -d. I turned on DBI
tracing (eventually at level 15, can you sense my desperation?); the
differences between connecting to Oracle first and connecting to DB2
first are:
  1) there is an extra environment variable (DB2INSTANCE=db2admin)
defined if I connect to DB2 first, and
  2) when already connected to DB2, the Oracle login crashes without
getting to OCISessionBegin().

Any ideas?

I also noticed that when I run the following script (from Tim's book),
it crashes when attempting to list Proxy data sources, complaining that
Proxy isn't properly installed. Could that be related to my Oracle/DB2
problem?

 my @drivers = DBI->available_drivers();
 foreach my $driver ( @drivers ) {
   print "Driver: $driver\n";
    my @dataSources = DBI->data_sources( $driver );
    foreach my $dataSource ( @dataSources ) {
      print "\tData Source is $dataSource\n";
    print "\n";
   }
 }

TIA,
Dave Mullen
American Family Mutual Insurance Company
I/S Financial Systems
===========================================
Any opinions expressed are strictly my own, and do not
necessarily reflect the views of American Family Mutual
Insurance Company or its related companies.
===========================================



Relevant Pages

  • RE: Memory fault(coredump) with two DBD type connections
    ... I get a core dump ... all the libraries are the same threaded model(single threaded perl uses ... I am running Perl 5.8.8 with DBD-Oracle 1.19 compiled against Oracle ... when I try to connect to the same Oracle database AND same DB2 database ...
    (perl.dbi.users)
  • RE: Perl Oracle incompatibility
    ... Moreover i have not done any changes except to upgrade my Oracle ... database and nothing else. ... Subject: Perl Oracle incompatibility ...
    (perl.dbi.users)
  • RE: Problem with connecting to an Oracle database using Perl
    ... specifically ORACLE_HOME and maybe the NLS vars. ... Problem with connecting to an Oracle database using Perl ...
    (perl.dbi.users)
  • Re: DBD::Oracle crashes non-deterministic
    ... No, unfortunately it really CRASHES perl, i.e. it dumps core in the oracle ... One difference we have found is that if we are targetting a 9i R2 Database ...
    (perl.dbi.users)
  • Re: Would Oracle be considered?
    ... Thats good for Oracle users, but personally I wouldn't touch Oracle with a 10 foot pole. ... I think, there is no other database with such performance, scalability and security features. ... IBM last week announced a free version of its DB2 database aimed at attracting application developers who might have ... DB2 Express-C is available to customers and developers as a free download, ...
    (borland.public.delphi.non-technical)