Unfortunately, I\'m trying to use Oracle from .NET and it\'s like going to back to 1997. Explaining things properly is a sign of weakness and the registry and environment variab
I've spent days in the past trying to get Oracle connected in Windows 7.
The problem I encountered was that I had a 32-bit ASP.NET application with the 32-bit Oracle ODP.NET drivers installed. I wasn't aware that, even though the ASP.NET application runs as a 32-bit process and requires the 32-bit ODP.NET, IIS is a 64-bit process and causes ODP.NET to access the 64-bit registry keys. You didn't mention whether you were trying to setup Oracle for ASP.NET, but I'll share my fix (although it is for the Oracle 10.2 install).
(I'm copying this verbatim from my blog post)
Note: this forces Oracle 11.2.0.1 to use 32-bit only in a 64-bit environment.
The first mistake I made was to install the Oracle 10g client on Windows 7. This WILL NOT work. If you install it, you will have to perform some cleanup afterward.
HKLM\SOFTWARE\Wow6432Node\ORACLE\inst_loc
points to the proper location (probably C:\oracle\Inventory)HKLM\SOFTWARE\Wow6432Node\ORACLE\VOBHOME2.0
to the 32-bit Oracle folderORACLE_HOME
environment variable and point it to the 32-bit folder.Now you should be all set after a restart.
If you tried installing the Oracle 10g client, you'll have to perform some cleanup. First, make sure Oracle 10g is completely uninstalled, dereferenced from your PATH variable, and the directory is removed. Then, find the assemblies referenced in the GAC:
gacutil /l | find /i "Oracle" > c:\[some directory]\oracle.txt
Find the lines referring to Oracle.DataAccess version 10.2 and remove them from the GAC. As an example (this won't work unless you have the same version installed):
gacutil /u "Oracle.DataAccess, Version=10.2.0.100, Culture=neutral, PublicKeyToken=89b483f429c47342"
When I did this, I had three assemblies to remove:
Again, you'll probably need to restart (hey, it's Windows).
If you need to perform any cleanup, I've also blogged about that
For reference
In case the link to the "Dummy registry entry" steps dies, here's the text from that post by Gadi:
"" Hi Ben,
At design time, when working with the SQL Server Business Intelligence Development Studio, the Oracle Connector is running in 32-bit mode and therefore it loads the 32-bit Oracle client.
Most likelly, you are getting the error because the connector is loading the wrong Oracle client (oci.dll), where the TNS service is not defined.
To solve the problem, you have two options:
Specify the Oracle connection string, instead of the TNS service name in the Oracle Connection Manager Editor, for example, in the following format: host:port/service_name
Define a dummy registry entry (Z_SSIS
) as follows:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE
.Z_SSIS
(to make sure it's the last entry).Z_SSIS
node and click on New -> String.ORACLE_HOME
.ORACLE_HOME
and set it to the location of the Oracle 32Bit installation home directory you whant to use.Regards,
Gadi ""