ORA-12557 TNS:protocol adapter not loadable

64,694

Solution 1

The ORA-12577 error is related to Windows Environment or Oracle Home PATH because sqlplus command works smoothly when I execute it inside ORACLE_HOME\bin . Its because of two or more oracle installs (say database and companion) in separate ORACLE_HOMEs on that machine unset the ORACLE_HOME value in your window For Details please follow the following steps and hope so you will get the solution. http://www.dba-oracle.com/t_ora_12577.htm

Solution 2

The base problem is that there are DLLs missing in the Oracle instant client installation that exist in the RDBMS server installation that the application requires. This is why switching Oracle homes from client_1 to db_1 works, rather than it being a purely a PATH problem.

sqlplus works in either situation because it uses the minimal set of DLLs which exist in both Oracle installations.

Solution 3

Here are a few things to check. Dont forget to try #3 if needed, it fix the problem for me!

  1. Make sure all Oracle services are started
  2. Make sure environment variables are set (PATH, ORACLE_SID=ORALOCAL, TNS_ADMIN=C:\Dev\Oracle\product\11.2.0\dbhome\NETWORK\ADMIN)
  3. Try shifting the Path environment variable values like so: “D:\Dev\Oracle\product\11.2.0\dbhome\bin” to be before the “D:\dev\Oracle\product\11.2.0\client_32\bin” in the order

Fissh

Share:
64,694
James Randles
Author by

James Randles

Updated on July 09, 2022

Comments

  • James Randles
    James Randles almost 2 years

    I am trying to develop a C# Windows Forms Application targeting the .net 4 framework. The program will execute a stored procedure against an Oracle Database and I get the following error when I try to open the connection to the database.

    ORA-12557 TNS:protocol adapter not loadable

    I am developing this in Visual Studio 2012 and have managed to make the Server Explorer connect to the database successfully, however I keep getting this error through my application.

    I have two Oracle 11g clients on my machine. One is 32bit and the other is 64bit. I do need both for different applications so it is not possible to remove one. I have also tried changing the order of the Oracle home directories in the PATH variable. Currently I have the 64bit one first which is the one I would like to connect with.

    I am connecting my application to the Database using ODP.NET and have referenced the dll from the 64bit application.

    As far as I can tell I have done what has been suggested and have not managed to get it working. If anyone could help it would be appreciated.

  • James Randles
    James Randles over 10 years
    I have looked at this article and tried changing the order of the ORACLE_HOMEs in the PATH variable as mentioned above. It is most likely something along these lines but changing them in the PATH does not fix it.
  • Talha Hanjra
    Talha Hanjra over 10 years
    well James I have faced the same problem and I installed home/db_1 for db install and then home/client_1. Went into system variables after client install and changed path from home/client_1 to home/db_1 and do not get error.
  • James Randles
    James Randles over 10 years
    You are right. I also had to delete the ORACLE_HOME variable I had added. Most likely to solve another issue I had at some point which hopefully will not resurface. However, getting the paths in right order worked. The other issue was that I had not realized that the updating the PATH variable would not take affect in my program until I had restarted Visual Studio. Thanks!
  • James Randles
    James Randles over 10 years
    It is probably also worth mentioning for future purposes that I had a client_1 and client_2 rather than client and db. I had to put the client_1 home directory first and then the client_1 bin directory before any client_2 directories.
  • damnnewbie
    damnnewbie about 8 years
    While this may be obvious to some, I had to update the registry entry for ORACLE_HOME. My environment variable paths were all correct, but in my case the registry settings were all setup for Oracle32 instead of Oracle64. registry location: HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraClient11g_home1
  • EdStevens
    EdStevens about 5 years
    it wasn't because you switched from a "client" home to a "database" home. It was because you switched from an instant client home to a home with a full run-time client, which the database home has. If your client home had been installed with the 'run-time' client instead of the 'instant' client, I'll bet it would have worked.
  • EdStevens
    EdStevens about 5 years
    On updating PATH (and any other environment variable) .. keep in mind that this is not an oracle issue. The enviornment settings are set / inherited at the time that a process (any process) is started. Changing them only effects processes that are started after the change. Again, basic OS operation, not a matter of Oracle behavior or control.