Solved

Oracle Client compatibility

Posted on 2010-11-29
11
877 Views
Last Modified: 2012-05-10
I have two databases  on two different machines, lets call them A and B both of which are Oracle 11g.  I am running a vb.net app from  machine B.  This application must connect to both A and B databases.  My question  is about the client software install.  I know that the oracle server install includes all the necessary dlls to act as a client as well however, I cannot get my application to communicate with the databases. I am using the Oracle.DataAccess.dll which is in the same folder as my exe but I also did a search and found it in the oracle folder of both machines. I thought as long as the client dlls were on the same machine as my app that I could communicate with any database. How come my application cannot communicate with the local database?  Any help would be appreciated, I am in a bit of a time crunch.

Forgot to mention:  I am getting a TypeInitializationException.  The provider is not compatible with the version of Oracle Client

Thanks
0
Comment
Question by:merianom
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
11 Comments
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34233191
You need the same version of Oracle.DataAccess.dll that your app was compiled with.  Right click and select properties the nversion.

You will need to install that version of the Oracle client on the app server or recompile your app to use the Oracle ODP.Net version installed on the app server.
0
 

Author Comment

by:merianom
ID: 34238056
I compiled my app with the instant client version of the DataAccess.dll ( 2.112.1.2) and the version on the server is 2.112.1.0.  I thought the versions were all compatible? Shouldnt it still work since the version I compiled my app with is in the same folder as my app executable?

Thanks for responding so quickly
0
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 34238605
I've had weird things happen with the Oracle ODAC and .Net.  It's always best to keep the versions exactly the same.  Even though the DataAccess.dll is there wit hthe app, it calls other Oracle dlls.  Oracle loves changing their APIs across versions (even minor releases).

I just know enough about .Net to be dangerous but doesn't the DLLs belong in the BIN folder not in the folder with the .exe?
0
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 

Author Comment

by:merianom
ID: 34240930
I am in the same boat with .NET.  I know just enough.....
The .exe and the dll are in the bin folder however, I use a setup project to deploy the app which places the dlls and the .exe in a folder of my choosing.  

My issue with the versions is that I am not sure which version of the Oracle.DataAccess.dll they are going to have on the target machine.
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34240994
I've never really gotten ODP and .Net to play nice unless I'm using the same versions.  You will likely need to specify the Oracle client version.

Any reason you just don't use SQL*Loader to load flat files and do away with the app all together?  For the most part SQL*Loader control files work across different versions of Oracle (unless there are new or deprecated features).
0
 

Author Comment

by:merianom
ID: 34241217
My application does many things, one of which is to extract data from Oracle on demand. So basically even though I am using running my application on the same machine as an Oracle server, I have to install oracle client so that I can dictate  (or in other words make sure) that the end user is using the correct dll versions?
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34241245
If you cannot match the end users version, installing a separate client is what I'm thinking.

Unless another Expert stops by and has any other information that might work.  I'll add a few more Zones.
0
 

Author Comment

by:merianom
ID: 34241260
Thank you.  I appreciate all your info.  I will try to do the client install on the target machine and see what happens.  I will update when I know more

0
 

Author Comment

by:merianom
ID: 34242109
instead of doing the client install on the target machine.  I copied the Oracle.DataAccess.dll from the target machine to the development machine and rebuilt my application.  As i suspected it worked without any issues.  I guess my next step would be to figure out if I can control which version of the server is installed on the client.  

The other direction would be to install the correct client with my application.  Does anyone know if this is possible?  

Thanks again for all your help
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34242206
If you can figure out a way to have the MSoft installer call another program, Oracle has a silent install option.  This allows you to install Oracle products form a command line without a GUI.

I've never used the silent installer nor do I know if the Instant Client will install silently but you can read up on the options and see.

http://download.oracle.com/docs/cd/E11882_01/install.112/e10844/advance.htm#CHDICDJA
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question