R – What can cause an intermitent ORA-12560: TNS:protocol adapter error

ora-12560oracle

I have a poorly written legacy .NET application that is in constant contact with the database throwing up a "No Connection" screen if it detects that connectivity has been dropped.

All machines running this program are configured identically but on two of them we just recently started running into a problem where the No Connection screen comes up regardless of whether there is connectivity or not and won't detect the connection until the computer itself is restarted.

Looking into error logs it seems that the culprit is

ORA-12560: TNS:protocol adapter error

But what can possibly be causing this? Especially since this wasn't happening until just a few weeks ago.

Best Answer

Most probably, the machines cannot resolve the DNS names provided in the HOST entry of tnsnames.ora, or access the server provided in the HOST entry.

If the connection drops on timeout (as if underlying TCP stream drops on timeout), it will also fail with this message.

If you use tnsnames.ora on Oracle 10g or higher, try to use Easy Connect format (//servername/servicename) instead.

Related Topic