I have 64-bit Oracle Database Server (11.2.0.3) installed on Windows 2008 R2, and naturally, it automatically installs the 64-bit client. I have to install an application onto this server that is 32-bit and requires the 32-bit Oracle client. (Don't Ask - I can't install the 64-bit version of this app, it won't work with the 64-bit client, and I can't install it on another server.)
Now i have tried installing the 32-bit Client into a different physical folder and selected a different value for the Oracle Base and Software Location when installing and it installed just fine. And it put the BIN folder of the 32-bit Client installation at the head of the PATH statemtn.
However, when i tried to run "SQLplus system/system" with the 32-bit version it gives me the "ORA-12560: TNS:protocol adapter error". When I go into the folder with the 64-bit sqlplus.exe and ran it (directly and not through PATH), the "system/system" credentials worked fine.
I copied the TNSNames folder from the Oracle Server's NETWORK/admin folder to the Oracle Client's NETWORK/admin folder, and rebooted the server. Same results.
This is the extent of my troubleshooting knowledge for Oracle.
How can i get the 32-bit Client to run on the same server as the 64-bit Oracle Server? I know in linux/Unix, you simply put in the lib32 folder into the the 64-bit client folder and set a couple of environment variables, but i'm pretty sure it's not that simple in Windows.
If there is a way to do this, please be descriptive in you answer as I will need step-by-step instructions.
Thanks in advance.
Here is an instruction how to install 32-bit and 64-bit Oracle Client on one machine. Follow the instruction, then it should work.
Assumptions: Oracle Home is called OraClient11g_home1
, Client Version is 11gR2
Download and install Oracle x86 Client, for example into C:\Oracle\11.2\Client_x86
Download and install Oracle x64 Client into different folder, for example to C:\Oracle\11.2\Client_x64
Open command line tool, go to folder %WINDIR%\System32, typically C:\Windows\System32
and create a symbolic link ora112
to folder C:\Oracle\11.2\Client_x64
(see commands section below)
Change to folder %WINDIR%\SysWOW64, typically C:\Windows\SysWOW64
and create a symbolic link ora112
to folder C:\Oracle\11.2\Client_x86
, (see below)
Modify the PATH
environment variable, replace all entries like C:\Oracle\11.2\Client_x86
and C:\Oracle\11.2\Client_x64
by C:\Windows\System32\ora112
, respective their \bin
subfolder. Note: C:\Windows\SysWOW64\ora112
must not be in PATH environment.
If needed set your ORACLE_HOME
environment variable to C:\Windows\System32\ora112
Open your Registry Editor. Set Registry value HKLM\Software\ORACLE\KEY_OraClient11g_home1\ORACLE_HOME
to C:\Windows\System32\ora112
. Using C:\Oracle\11.2\Client_x64
should also work.
Set Registry value HKLM\Software\Wow6432Node\ORACLE\KEY_OraClient11g_home1\ORACLE_HOME
to C:\Windows\System32\ora112
(not C:\Windows\SysWOW64\ora112
). Using C:\Oracle\11.2\Client_x86
should also work.
You are done! Now you can use x86 and x64 Oracle client seamless together, i.e. an x86 application will load the x86 libraries, an x64 application loads the x64 libraries without any further modification on your system.
Probably it is a smart idea to set your TNS_ADMIN
environment variable (resp. TNS_ADMIN
entries in Registry) to a common location, for example TNS_ADMIN=C:\Oracle\Common\network\admin
Commands to create symbolic links:
cd C:\Windows\System32
mklink /d ora112 C:\Oracle\11.2\Client_x64
cd C:\Windows\SysWOW64
mklink /d ora112 C:\Oracle\11.2\Client_x86
Notes:
Both symbolic links must have the same name, e.g. ora112
.
Despite of their names folder C:\Windows\System32
contains the x64 libraries, whereas C:\Windows\SysWOW64
contains the x86 (32-bit) libraries. Don't be confused.