Multiple Oracle Clients DAC - oracle

My group is moving to a new Windows Server (Windows Server 2016). We need to migrate existing code without re-compiling. The existing code (on old Server 2008) utilizes Oracle 11g and 12c clients 32 and 64 bit. Mostly Unmanaged (Oracle.DataAccess.Client) clients but some use managed clients (Oracle.ManagedDataAccess.Client).
Can I install all of these clients in the GAC so that the applications will select the correct one?

If you really managed to install Oracle 11g and 12c clients 32 and 64 bit and ODP.NET Managed Driver and all of them are working, then you can be proud of yourself.
ODP.NET Managed Driver (Oracle.ManagedDataAccess.Client) is independent from all others, you an just install it.
It is not needed to install more than one version (i.e. one each for 32-bit and 64-bit). So, just install version 12 and you are done.
Unless you force a specific version (see How to load specific version of assembly from GAC) you have the Publisher policy which redirects to the installed version.
In case you install Oracle client 12.2 or never, have a look at SSMA unable to find specified provider

Related

-2147467259/Oracle client and networking components were not found

i have used vb6 application with oracle client 11. but at the run exe, i got the below error:
-2147467259/Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of
the Oracle Version 7.3.3 or later client software installation.
Provider is unable to function until these components are installed.
Application platform: VB6
Application Type: exe
Window: window 10
Oracle Client version: 11
This is a duplicate question and the cause could be a number of different issues. This is likely due to the wrong client version being installed on your machine, and/or it is related to a known issue involving a security update for specific versions of windows. Please see the following Questions on Stack Overflow.
VB6 application oracle 12 64bit connection
Error ORA-03106 When using VB6 to access Oracle database in Windows 7 64bit
Oracle Client and networking components were not found - Excel VBA
Connection to Oracle through VBA no longer working
Here is the Mircosoft support article on the patch issue: https://support.microsoft.com/en-us/help/3126587/ms16-014-description-of-the-security-update-for-windows-vista-windows
Most likely you installed the 64-bit version of Oracle Client 11. VB6 binaries are always 32-but, thus you must install the 32-bit version of Oracle Client.
In case you need both, 32 and 64 bit versions one one machine follow this instruction: BadImageFormatException. This will occur when running in 64 bit mode with the 32 bit Oracle client components installed
According to your error messages you use the drivers from Microsoft. These drivers are deprecated for ages, you should prefer the drivers from Oracle.

ODAC for visual studio 2013

There are a lot of ODAC download at the Oracle website but I want to know what is the right ODAC to download for my VS 2013? I have a Windows 7 64-bit OS.
And also, do I need to install ODAC on BOTH my laptop (where I will create my project) and to the Oracle database server?
When I'm trying to connect to my Oracle database, it throws me this error:
System.Data.OracleClient requires Oracle client software version 8.1.7 or greater
so I read other blogs saying that I should install ODAC, but these blogs example are using either VS2005 or VS2008, but mine is VS2013
Start with easy answers:
No, you don't have to install any ODAC on Oracle database server (most likely they might be installed anyway by default)
It does not matter at all which Visual Studio you have, regarding Oracle installation they are all the same.
Now regarding your error:
"Microsoft .NET Framework Data Provider for Oracle", i.e. System.Data.OracleClient is deprecated for ages, you should not use it in new projects. You should use the Oracle provider "Oracle Data Provider for .NET" (ODP.NET), so by downloading ODAC from Oracle you have been on the right path.
When you like to use ODP.NET you also have to install an Oracle Client, otherwise it does not work (this requirement is also valid for System.Data.OracleClient, that's the actual error you get).
You can either install "Oracle Instant Client" and ODP.NET or download full Oracle Client where you can make a "Custom" installation. There you have to enable component "Oracle Data Provider for .NET" at least.
It is important to have everywhere the same architecture, i.e. Oracle Client, ODP.NET and your application must be all the same - either x86 or x64 ("AnyCPU" means x64 on nowadays 64-bit Windows). In case you have to support both x86 and x64 follow this instruction to install x86 and x64 on one machine.
Another possibility is to use the "ODP.NET Managed Driver", this one is just a single .dll and does not require any further Oracle client installation. Unlike "ODP.NET" the "ODP.NET Managed Driver" does not depend on the architecture, i.e. it works for both x86 and x64.
It does not matter whether your database is 32-bit or 64-bit. This applies for everything mentioned above.

Properly Install Oracle ODAC With ODT 11.2.3.20

Ok - I have VS 2012 and VS 2013 installed on a 32-bit developer machine running Windows 7 Enterprise and am attempting to connect to an Oracle 9 database. I can install version 12.1.0.24 without a problem, and I can connect to most databases using ODP.NET Managed and Unmanaged drivers through Server Data Connections tool, etc. Problem is that I also have to build applications that connect to legacy Oracle DB Server instances, and really need an older version of the VS Tools and ODP.NET / ODAC, ie 11.2.3.20. This seemingly installs correctly, but when you try to build a new data connection, the default Data Provider is ".NET Framework Data Provider for Oracle" There is an option for "Oracle Data Provider for .NET", but there is seemingly no way to specify a tnsnames.ora location, and the only option available in the "Data Source Name" combo is "(Local Database)."
Furthermore no option for picking Managed or Unmanaged for the Provider is available. Can somebody please tell me the proper thing to do to get this to work? Are there machine-wide configurations I have to make manually, that the installer for 12.1.0.24 does automatically?
Usually there is no need to install more than one Oracle Client (resp. one each for 32-bit and 64-bit). You can connect to older database with 12.1 client (for Managed Driver the Database must be 10.2 or newer).
Most likely you messed up your Oracle installation, remove them all and install one version from scratch.
In order to make you application independent from installed Oracle Client open *.csproj, resp. *.vbproj file and edit reference to ODP.NET like this:
<Reference Include="Oracle.DataAccess">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
Attributes like Version=... or processorArchitecture=... are not required. Your application will load the correct Oracle.DataAccess.dll depending on selected architecture and target .NET framework (provided that it is installed properly)
"Oracle.DataAccess" and "Oracle.ManagedDataAccess" are different assemblies, so you cannot use them seamless - unless you use DbProviderFactory and such stuff.

Is ODP.NET required for Oracle 11g Client?

I may be asking the wrong question here, I'm willing to change it if so.
I have a project that is using the Microsoft.NET Oracle provider (our plan is to change to ODP but we haven't done so yet).
I am trying to get this project to build on a windows 2008 (x64) build server. It builds just fine but our unit tests fail when they hit stuff on the Oracle database.
I had initially installed the 32bit oracle 9i client which is what we currently use on our winxp dev boxes and the previous 2003 build server. But now this gets a message like: Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.
We tried compiling to the x86 platform but that didn't change the error message.
I now have the 11g 64 bit client installed but I am getting a message saying System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.
So what Oracle install should I be using?
Edit:
I was able to get this to work. Turned out it was the testing causing the problem, by forcing NUnit to run in 32bit mode: Link I was able to get the tests to work using the old 32 bit driver. This would be a crappy answer to the question so I am not using it but will gladly award the correct answer to anyone putting in some good info on transitioning to Oracle 64bit drivers.
When it comes to Oracle, I like to use Oracle Instant Client :
You don't have to install anything on the target machines (including dev boxes !).
You can make sure that your application will run with the specific client you picked.
You could even easily have multiple applications work with different client versions on the same computer.
As a downside, it adds a significant weight to your application (~19Mb minimum).
Check What is the minimum client footprint required to connect C# to an Oracle database? for more information. To know how to set up a Visual Studio project that will work on x86 as well as x64 machines, check my blog post Oracle Instant Client in Visual Studio.
I'm adding a new answer since as of this fall (2012) the ODP Managed Code Beta is available. See this link for more information. It is for us highly stable and we are using it in production, mainly because of these reasons:
No installation (except for entity framework where a simple registration is needed)
It is smaller than the unmanaged version, the footprint is approx 6 MB.
It is NOT "bit sensitive", ie Any CPU will finally work with ODP :)
More intuitive mapping C# types <-> Oracle types (and it solved some problems with EF and model generation from database)
Supports EZCONNECT (all versions of the unmanaged ODP did not), ie no more tnsnames.ora hassles.
But for transitioning to 64 bit, download the managed ODP driver and change the Oracle.DataAccess reference to Oracle.ManagedDataAccess and recompile :)
I think the message "System.Data.OracleClient requires Oracle client software version 8.1.7 or greater" it's similar to "Oracle client not installed, installed but not found or installed but it's needed 8.1.7 or greater".
Check on regedit if the values are right under the key:
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraOdac11g_home1
Where OraOdac11g_home1 depends on the Oracle Home name for your installation.
Also, try to connect through Visual Studio to see if its possible.
I have had an issue which could relate to what you are seeing.
I initially had the just the Oracle 10g client installed on my machine and the .Net Oracle.DataAccess component version number was 10.2.0.100 - this was for .Net runtime v1.0.3705
I installed ODP.Net and the Oracle.DataAccess component version is now v2.102.2.20 and runs on .Net runtime v2.0.50727 - I cant find the reference as to why Oracle did this - it was something to do with bringing version numbers in line with the runtime version
It took me a day to work this out. We dont use the 11g client yet and I havent used the 8i client for ages so I dont know what the version numbers would be for those clients, but I'd check it if I were you what.
In short, Oracle back-tracked the component version numbers which could be making your 11g component appear out-of-date as opposed to Oracle 8i components
I have found many times that the error "requires Oracle client software version 8.1.7 or greater" is a notoriously misleading error. From distant memory I seem to remember that this usually indicates a file IO permissions problem. I think it may be that the ASP.NET worker process (or whichever identity an application is running under) requires some sort of read or write permission to a folder in the oracle client folder hierarchy...
This can be a cause of multiple oracle homes in the environment. Remove the older version oracle home in your build system. try generating the build again with the single home. There are some issues with 9i version ODP.NET and 10G/11G connectivity

Installing Oracle 10 ODP.NET on Microsoft Windows 2008 Server 64bit

I've tried to install "Oracle10g Release 2 ODAC (64-bit) 10.2.0.3 for Windows x64" from:
http://www.oracle.com/technology/software/tech/windows/odpnet/64-bit/index.html
on Windows 2008 server 64bit, but it crushes right after i run the setup.exe with the following error:
Problem signature: Problem Event
Name: APPCRASH Application
Name: javaw.exe Application
Version: 5.0.40.5 Application
Timestamp: 42a019e4 Fault Module
Name: StackHash_5c81 Fault Module
Version: 6.0.6001.18000 Fault Module
Timestamp: 4791adec Exception
Code: c0000374 Exception
Offset: 00000000000a6e97 OS
Version: 6.0.6001.2.1.0.272.7 Locale
ID: 1037 Additional Information
1: 5c81 Additional Information
2: fa1981fc0da3377cbbec45e762388188
Additional Information 3: 7698
Additional Information
4: 7defb6f15001721d919a359fb7888c17
Read our privacy statement:
http://go.microsoft.com/fwlink/?linkid=50163&clcid=0x0409
can anyone direct me to a version that i can install the latesr version of ODP.NET for Windows 2008 server 64bit?
Best regards,
Guy Bertental
It's a really tricky. Before installing ODP.NET you need to already have working connection setup to oracle database. That means:
Step 1:
Oracle install client (never succeeded with that, not recommended) or Oracle client (succeeded on Win7 ultimate 64bit, file win64_11gR1_client.zip, installed with "Runtime" option selected). After client install make sure you can connect. From command line try "tnsping yourtnanamesentry" to check if tnsnames is ok, and after that "sqlplus username/pwd#yourtnsnamesentry" to check if you know valid user and password and really can connect. Memorize or write down oracle home name and path you choosed during install.
Step 2:
Install ODP.NET (I did with file ODAC1110720.zip). Use exactly the same oracle home name, but different path during installation.
Step 3: try connecting with visual studio. For "server name" I used this: "oraclexe:1521/xe". That means I have machine called "oraclexe" which has oracle listener on port 1521, and database with instance name "xe". It's so-called "EZCONNECT" name.
I'm not sure if Step 1 is really needed or not, because maybe step3 really uses just oracle instant client.
I know, it is real pain, but this works. It took me 2 days to connect to oracle, and I had to install almost 1GB of downloaded oracle software. They could and should make that much, much, much, much easier. Like one-click install that just works. This is shame how complicated client install is.
Donwload and install Oracle Database 11g Release 2 Client (11.2.0.1.0) for Microsoft Windows (32-bit) on your development computer.
Delete former references to Oracle.DataAccess on your project.
Add the new reference pointing to this new version.
In Visual Studio, after adding the reference select it, then choose properties to check the setting. Set “Specific Version” true , then check that “Copy Local” is false.
Build your solution using ANY CPU target.
Next, prepare your server. Install Oracle Database 11g Release 2 Client (11.2.0.1.0) for Microsoft Windows (x64) . When installing, select the RUNTIME OPTION.
Finally, deploy your solution to your server, as you always use to do. This time it should work.
The trick is to have the same ODAC version (11.2.0.1.0) on both the development and deployment enviroments. This ODAC contains the Oracle.DataAcces.Client which you should reference on your code to access classes like OracleConnection, OracleDataReader, etc.
I had problems because I had developed using ODAC 11.2.0.1.2 (32 bits, latest at this time) but there's no x64 version for this ODAC.
So, always use the latest stable ODAC version which has 32 bits and 64 bits version if you are going to develop on 32 bits and deploy on 64 bits.
Hi Ran into your problem, solution is get a copy of 10204_vista_w2k8_x64_production_client.zip (http://www.oracle.com/technetwork/database/10204-winx64-vista-win2k8-082253.html) run this & it will install the client.
Unpack ODAC10203x64.zip then go to All Programs->OracleHome->Oracle Installation Products & run the Universal Installer. When the installer runs at the Specify Source Location browse to the Stage directory created when you unpacked ODAC10203x64.zip then install as normal.
There is a ODAC112012.zip but this will not talk to Oracle 9 dB's so the above will resolve talking to legacy dB's.
Guy- have a look at this, it may help. Getting Oracle client working is a pain at the best of times, x64 must make it harder.
I had unexpected crashes in my application using Instant Client 10.2.0.3 on Windows Server 2008 x64. After reading a few posts about the lack of support for this platform, I upgraded the client to 11.1.0.7 and it works like a charm !
So I would be surprised if ODP .NET 10.2.0.3 would be stable on Windows Server 2008 x64, if you ever managed to install it. IMHO, your options are :
use another provider (Microsoft+client v11.1, or DataDirect...).
go with the 11.1.0.7 beta version if you dare...

Resources