Join this Blog for direct reference of any post into your inbox. To join just click on "Join this Site" under "Follower" then Login with your Email.*** DECLARATION: I Maintain this Blog for Helping Myself While at Work and Welcome any body Needing Help!!!.*** CAUTION: Using any of the script from this Blog may contain at Own Risk. These scripts May or May not have been Tested.***

Sunday, 19 October 2014

Toad: Cannot Load oci.dll: While Connecting

I installed oracle 10g on windows 7 successfully. I found everything is working except toad. I can connect the database through SQL*plus but when I open toad, my oracle installation is not appearing in the “connect using” box.
When I go through the toad user guide, find the following information how it finds client:
1.      Toad first look in the toad command line for oci.dll
2.      If it is not found, then it checks the command line argument ORACLE-HOME
3.      If there is no toad home defined then toad will display the home that is set as the default home active in dropdown.
4.      To populate the drop down, toad searches the registry as follows:
5.      First, Toad reads the list of Oracle home names from the keys under HKEY_ LOCAL_MACHINE\SOFTWARE\ORACLE\ALL_HOMES
If no Oracle homes are found there, then the Oracle home is set to HKEY_ LOCAL_MACHINE\SOFTWARE\ORACLE
Otherwise, Toad finds the ORACLE_HOME value for each Oracle home, if it exists. Then Toad checks the system environment variable called PATH to see
whether it contains the "bin" folder under ORACLE_HOME. Toad selects the
Oracle home whose path appears first in PATH.
If Toad still hasn't found an Oracle home, it uses HKEY_LOCAL_ MACHINE\SOFTWARE\ORACLE.
6.      Toad looks for the client DLL in the "Bin" folder under the path found for the
Oracle home. If that fails, Toad looks for the ORACLE_HOME key under HKEY_LOCAL_
MACHINE\ORACLE\SOFTWARE, and look for the client dll in the "Bin" folder. If that also fails, Toad looks for the client dll in every \bin directory in PATH.

Sometimes the error “cannot load oci.dll” occurs whenever we try to connect with the oracle database by using the third-party tools such as Toad, sqltools and others. This error may occur because of the following reason:
1.      The oci.dll error may occur because you have not set the correct ORACLE_HOME and path in environment variables. 
2.      It might be possible that the oci.dll file may be corrupt or may not exist on the correct path.
3.      May be possible that oci.dll may not be correct version such as 32bit s/w will load a 32bit DDL. It cannot use a 64bit DLL for a 32bit executable. 
To solve this issue, consider the below points:
1.      Check the ORACLE_HOME and Path setting in the environment variable.
2.      Check the correct location of the oci.dll path. The path of the oci.dll file is $ORACLE_HOME\bin\oci.dll
3.      Check the oci.dll correct version.
I checked my registry, and my oracle installion does appear in a 10g folder within HKEY_
In my case, I am facing this issue because of incompatible with 64 bit installation of oracle. Toad looks for oracle installation under HKEY_LOCAL_MACHINE/SOFTWARE/WOW6432NODE/ORACLE which is where, because that is where 32 bit installations are registered. So I installed a 32 bit version of oracle, then after I am able to open every thing including toad.
Conclusion: Toad works with both 32 bit and 64 bit oracle server where as toad only work with 32 bit client. If you need 64 bit client for other applications, you can install both 32 bit and 64 bit client on a single machine and just tell the toad to use the 32 bit client.


  1. Excellent piece of information. Thanks for the post, it's really helpful.

    In my case, it was Windows 7 64-bit laptop with 64-Bit oracle database installed. My toad didn't connect as it was expecting 32-bit client. In toad installation options (Version 11.5) it asked me to install Oracle instant client zip and rest it will take care of it. I mistakenly downloaded Oracle Instantclient 64 bit version and "can't load oci.dll" error showed up. I then realized and downloaded 32 bit version of instantclient and finally Toad could connect to oracle without any issues..