Tuesday, May 3, 2016

Using both 32-bit and 64-bit Oracle Client

While trying to resolve Oracle Client bitness conflicts, I came across this post:


I followed those instructions, using the 12c Instant Client downloads, and it resolved my error. In case that post disappears, here is a summary of the instructions (credit to Frank Quednau for his post):

  1. Download both Oracle Client packages (32-bit and 64-bit). I downloaded the following files (from Oracle.com):
  2. Unblock both downloaded files before continuing
  3. Each of those .zip files contains a folder called instantclient_12_1; extract and rename that folder somewhere on the machine, e.g.:
    C:\oracle\12c_32   (this is instantclient_12_1 extracted from instantclient-basiclite-nt-
    C:\oracle\12c_64  (this is instantclient_12_1 extracted from instantclient-basiclite-windows.x64-
  4. Start an elevated Command Prompt (aka Run as Administrator)
  5. Change to %WINDIR%\system32, e.g.:
  6. Make a soft link that points to the 12c_64 folder:
    C:\Windows\System32>mklink /d 12c C:\oracle\12c_64
    symbolic link created for 12c <<==>> C:\oracle\12c_64
  7. Change to %WINDIR%\SysWOW64, e.g.:
  8. Make a soft link that points to the 12c_32 folder:
    C:\Windows\SysWOW64>mklink /d 12c C:\oracle\12c_32
    symbolic link created for 12c <<==>> C:\oracle\12c_32
  9. NOTE: Make sure that both symbolic links have the same name, e.g.:
  10. Edit your system %PATH% environment variable and add the full path (do not use %WINDIR%) to the first symbolic link:
  11. Restart your machine, or at least restart whatever application is connecting to Oracle
With this setup, TNSNAMES.ORA does not seem to work. Instead, put the full descriptor directly in the connection string:

Data Source=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = = 1521))(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)));User ID=someuser;Password=yourpassword;

No comments:

Post a Comment