ORA-12557 TNS: protocol adapter not loading

I am trying to develop a C # application for Windows Forms that focuses on the .net 4 infrastructure. The program will execute the stored procedure against the Oracle database and I will get the following error when trying to open a connection to the database.

ORA-12557 TNS: protocol adapter not loading

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

I have two Oracle 11g clients on my machine. One of them is 32 bits, and the other is 64 bits. I need both for different applications, so they cannot be deleted. I also tried changing the order of the original Oracle directories in the PATH variable. I currently have a 64-bit first that I would like to connect to.

I connect my application to the database using ODP.NET and refer to the DLL from the 64-bit application.

As far as I can tell, I did what was suggested, and I was not able to get it to work. If anyone can help, this will be appreciated.

+9
c # database oracle visual-studio
source share
4 answers

The ORA-12577 error is related to the Windows Environment or Oracle Home PATH because the sqlplus command works smoothly when I execute it inside ORACLE_HOME \ bin. Because of two or more oracle installations (say, a database and a companion) in separate ORACLE_HOME on this machine, it disables the ORACLE_HOME value in your window. For more information, follow these steps and hope that you get a solution. http://www.dba-oracle.com/t_ora_12577.htm

+12
source share

The main problem is that in installing the Oracle Instant Client client, which exist on the RDBMS server installation, applications are required, and DLLs are missing. This is why working with Oracle servers from client_1 to db_1 works, and not just the PATH problem.

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

+2
source share

Here are a few things to check. Remember to try # 3, if necessary, fix the problem for me!

  • Verify that all Oracle services are running.
  • Make sure the environment variables are set (PATH, ORACLE_SID = ORALOCAL, TNS_ADMIN = C: \ Dev \ Oracle \ product \ 11.2.0 \ dbhome \ NETWORK \ ADMIN)
  • Try changing the values ​​of the Path environment variables as follows: "D: \ Dev \ Oracle \ product \ 11.2.0 \ dbhome \ bin" will be before "D: \ dev \ Oracle \ product \ 11.2.0 \ client_32 \ bin" in order

Fissh

+1
source share

I am using the IIS.net provider. I was able to fix the problem with sqlplus by placing oracle64 in front of oracle32 in the path. This did not solve the problem with .net. I have applications that use oracle32 and oracle64. To solve this problem, the registry keys HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ ORACLE should point to \ oracle32 home, and HKEY_LOCAL_MACHINE \ SOFTWARE \ ORACLE should point to \ oracle (64) home.

0
source share

All Articles