Solved

Oracle Client compatibility

Posted on 2010-11-29
11
873 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
  • 5
  • 5
11 Comments
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
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
Comment Utility
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 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
Comment Utility
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
 

Author Comment

by:merianom
Comment Utility
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 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

by:merianom
Comment Utility
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 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
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
Comment Utility
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
Comment Utility
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 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

728 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now