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

From: Tim Bunce (Tim.Bunce_at_pobox.com)
Date: 11/01/04


Date: Mon, 1 Nov 2004 20:27:50 +0000
To: "Mullen, David A" <DMULLEN@amfam.com>

On Mon, Nov 01, 2004 at 12:55:18PM -0600, Mullen, David A wrote:
>
> 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.

See the README file in the DBD::Oracle distribution for how to get a
stack trace from the core file. Unlikely to get far without one.

> 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?

[Just a guess] DB2 may be setting the env var in a way that corrupts
the internal C environ pointers. Try setting DB2INSTANCE to that
value before connecting to DB2.

> 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?

Unlikely.

Tim.



Relevant Pages

  • RE: ADO.Net Connection Pooling Problem with Oracle
    ... the CLR is releasing the connection to your database. ... the number of database sessions in Oracle seem to ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: SOS! ORA-03114: not connected to ORACLE && MSs Bug??
    ... not connected to ORACLE && MS's Bug?? ... > but sometimes returning the following exception "ORA-03114: ... > when loosing the connection with the Oracle database server the connections ... > even after the connection with the database server has been restore. ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: SOS! ORA-03114: not connected to ORACLE && MSs Bug??
    ... not connected to ORACLE && MS's Bug?? ... > but sometimes returning the following exception "ORA-03114: ... > when loosing the connection with the Oracle database server the connections ... > even after the connection with the database server has been restore. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Connecting to ODBC DB at startup
    ... Creating an Oracle connection in an independent object ... Dim cnConn As ADODB.Connection ... Dim strDB As String ...
    (comp.databases.ms-access)
  • RE: SOS! ORA-03114: not connected to ORACLE && MSs Bug??
    ... not connected to ORACLE && MS's Bug?? ... > but sometimes returning the following exception "ORA-03114: ... > when loosing the connection with the Oracle database server the connections ... > even after the connection with the database server has been restore. ...
    (microsoft.public.dotnet.languages.csharp)