Cannot load OCI: C:\Oracle\product\12.2.0\client_1\BIN\OCI.dll

On Toad for Oracle version 13.1.0.78
Uninstalled 11g client on my desktop. Installed 12.2 client on my desktop. SQL+ works without issues with the 12.2 client.

I'm getting Cannot load OCI: C:\Oracle\product\12.2.0\client_1\BIN\OCI.dll error on TOAD. The file does exists in that directory, but somehow TOAD cannot load / see it?

Thank you

Check to see if the deinstallation of the 11g client was complete. Maybe it's still in the path, a few pieces still on your hard drive, etc.

Environment variable shows Path going to C:\Oracle\product\12.2.0\client_1\bin;
Nothing left in the folder anyway. But for precaution, I deleted the 11g client and rebooted before installing 12.2 client.

Does the bitness match? 32 bit Toad requires 32 but Oracle client. 64 bit Toad requires 64 bit Oracle client.

Yes. I have Toad for Oracle (64bit) and I installed 64 bit client

Any other clients installed or is this the only one?
I think I remember seeing this before when I had both 12.1 and 12.2 client installed at the same time.

If you do, you can temporarily rename the folder of your 12.1 client to see if that fixes.

No other client on this machine. Also, Toad is able to ID the client (under "Connect Using:"). I also checked "Make this the TOAD default home"

Well that simplifies things. Toad 13.1 should work with that client.

I wonder if something is off in the registry. I have done the following with success when I've had client problems.

Note: Before doing the following, see if you have a file called oraaccess.xml in the same location as your sqlnet.ora and tnsnames.ora files. This file does not need to be present, but if it is present, any mistakes in the file (or an empty file) will cause the dreaded "Can't initialize OCI. Error -1" error.

  1. Use the deinstaller to deinstall the 12.2 client
  2. Make sure there is no trace of any oracle client on your computer:
  • Hard drive (check where it was installed, and also look under Program Files and Program Files (x86)
  • System path
  • Registry: If either of these are still present after deinstall, make sure all clients are deinstalled. Then remove these registry hives if they still exist.
    • HKLM\SOFTWARE\ORACLE.
    • HKLM\SOFTWARE\Wow6432Node\ORACLE.
  • Environment Variables: Any oracle-related environment variables (except TNS_ADMIN) should be removed.
  1. Reboot
  2. Reinstall oracle client.
    If you have 64 bit Toad, you must use 64 bit Oracle client.
    If you have 32 bit Toad, you must use 32 bit Oracle client.

So deinstall, check registry, reboot and reinstall the client?
Will try that and update the thread.
Thank you djorlon!

Make sure all of these are clear: registry, system path, and hard drive.

Thank you John Dorlon; cleaning up registry fixed it.
HKLM\SOFTWARE\Wow6432Node\ORACLE still has a bunch of 11g client info.

2 Likes

Excellent, glad to hear it.