Could I use 2 connections with diff homes?

Could I use 2 connections with diff homes?

Postby Evclid » Fri 26 Feb 2010 11:33

Hello!
I have three Oracle clients.

I try this code:
Code: Select all
var c1 = new OracleConnection("User Id=user1;Password=user1;Server=SPB9879_10G_XE;Home=OraClient11g_home1;");
var c2 = new OracleConnection("User Id=user1;Password=user1;Server=XE2;Home=XEClient;");
c1.Open();
c2.Open();

This homes is not default.
c2.Open() raised Exception:
ORA-12154: TNS:could not resolve the connect identifier specified

If I will replace c1.Open() with c2.Open():
Code: Select all
var c1 = new OracleConnection("User Id=user1;Password=user1;Server=SPB9879_10G_XE;Home=OraClient11g_home1;");
var c2 = new OracleConnection("User Id=user1;Password=user1;Server=XE2;Home=XEClient;");
c2.Open();
c1.Open();
then c1.Open() raise Exception:
Can not load Oracle client. Check your PATH environment variable and registry settings.

But connection with default home or direct=true I can use in any time and it is not raise exceptions.

I could open connection with another Home only after restart Application. How I can resolve this problem?
Thank you.
Evclid
 
Posts: 7
Joined: Fri 26 Feb 2010 10:27

Postby StanislavK » Fri 26 Feb 2010 14:37

It should be possible to open two connections via different Oracle Homes at the same time.

Please specify the following:
1. The version of dotConnect for Oracle that you are using
2. Which Oracle home is default in your system
3. The exact versions of Oracle clients and servers you are using

We cannot reproduce the problem at the moment.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby Evclid » Fri 26 Feb 2010 15:11

I try use last versions...
I have Devart.Data.dll version 5.0.51.0
and Devart.Data.Oracle.dll version 5.55.90.0

I installed Oracle 11g Server with client but then I removed Server. It is home 'OraClient11g_home1'
Then I installed Oracle 10g Express server. It is client 'XE'
At the last I Installed light Oracle 10gXE Client. It is home 'XEClient'. I think it is default now.

Is it chaos? :shock:
Evclid
 
Posts: 7
Joined: Fri 26 Feb 2010 10:27

Postby Evclid » Fri 26 Feb 2010 15:25

It is my settings:
Image
Evclid
 
Posts: 7
Joined: Fri 26 Feb 2010 10:27

Postby StanislavK » Mon 01 Mar 2010 13:03

By light Oracle 10gXE Client, do you mean Oracle Lite? If yes, please note that dotConnect for Oracle does not support Oracle Lite.

Otherwise, please check that
1) you are able to connect to the server via XEClient with some standard tool
2) TNS name XE2 is properly set in the tnsnames.ora file of XEClient

I was unable to reproduce the problem with Oracle Clients of versions 11g and 10g Express Edition.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby Evclid » Tue 02 Mar 2010 08:36

By light Oracle 10gXE Client, I mean Oracle Database 10g Express Client
I used installation file OracleXEClient.exe (30,943,220 bytes)

1. What I can use as some standart tool?
If I use SQL*Plus of XEClient, connection is ok.
SQL> conn user1/user1@XE2
Connected.
SQL>

2. I created folder \network\admin in C:\XEClient and placed tnsnames.ora into.
XE2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = spb9879.prod.quest.corp)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
Evclid
 
Posts: 7
Joined: Fri 26 Feb 2010 10:27

Postby Evclid » Tue 02 Mar 2010 08:42

I think this is a problem of oracles clients, but I hope somebody could find a workaround or maybe standart resolve exists.
Evclid
 
Posts: 7
Joined: Fri 26 Feb 2010 10:27

Postby StanislavK » Tue 02 Mar 2010 12:18

We have investigated the situation. Using different Oracle clients at the same time inside a single application may cause conflicts between them, as clients' assemblies may partially coincide. So we can only recommend you to either use just one client or close the connection using OraClient11g_home1 before opening the one using XEClient.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby Evclid » Tue 02 Mar 2010 13:26

Unfortunatelly, closing of connections doesn't help. I forced to restart application.
Evclid
 
Posts: 7
Joined: Fri 26 Feb 2010 10:27

Postby StanislavK » Tue 02 Mar 2010 14:37

The Oracle client libraries are not unloaded from the application's memory domain, thus such problems are possible in the case of clients' conflict. Please refer to the Oracle support for possible workaround.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby Evclid » Tue 02 Mar 2010 14:47

Ok, I'll do it.
Very thank's for support.
Evclid
 
Posts: 7
Joined: Fri 26 Feb 2010 10:27


Return to dotConnect for Oracle