Cry about...
Oracle Troubleshooting

ORA-12560: TNS:protocol adapter error


When starting server manager the following error is generated:

ORA-12560: TNS:protocol adapter error occurred


Oracle classify this as a ‘generic protocol adapter error’. In my experience it indicates that Oracle client does not know what instance to connect to or what TNS alias to use.

Possible Remedies:

  • If running on the server (or workstation) that is running the database (i.e. if the database is local to the machine) then try explicitly setting ‘ORACLE_SID’. e.g.

set ORACLE_SID=<sid>

and then try again. If this works then consider whether to make the change permanent by specifying it as a system variable.

  • (Possibly 8.1.5 and later:) If running on the server (or workstation) that is running the database then check that the service name ‘OracleService<SID>’ ties up with the actual database SID. If the database SID is changed without recreating the service then this can lead to this error. To recreate the service:

oradimxx -delete -sid <old-sid>

oradimxx -new -sid <SID> -intpwd <internal-password> AUTO -pfile <full-init-ora-filename>

  • Try setting the environment variable ‘LOCAL’ to the required connection alias (typically the database SID) and then try again. (I am informed that for UNIX systems the environment variable TWO_TASK should instead be used.) Do be sure that the application that is being used picks up the new environment variable setting. Setting this to an invalid connection alias will typically produce ORA-12154: TNS:could not resolve service name.

  • Ignore the error and try connecting by specifying explicitly which connection alias to use.

  • Check that the network connection between the client computer and the server has not failed. From the client try pinging the server. (For general guidance on troubleshooting general network connectivity problems see my notes on General Network Connectivity Problems.)

Brian Brooks (Encorus Technologies, USA) has highlighted a problem with DHCP. If the database server has its IP address dynamically allocated by DHCP then its IP address may change. This is not likely to be a problem on a local network where DNS will take care of name resolution issues, but where the database server is on a remote network and its IP address needs to be explicitly specified in the client's lmhosts file then this can be a problem because it requires periodic updates to the client's lmhosts file. If faced with this scenario then push to get the database server allocated a permanent IP address.

Liew Shiang Chen (from Singapore) has contributed the following additional material on this error:

I encountered this problem a few times recently while setting up a test environment. I finally solved it when I stopped using terminal services to connect to the server during installation. An installation initiated at the physical console went without any problems for me. Also, I had to make sure the IIS server was stopped because a default installation would try to start up the Apache HTTP server for Oracle.

Using: Win2000 server, Oracle 8.1.7, not joined to the company domain.

Hope this would help others in the same spot.

This page represents one page of many pages of notes I made whilst working with Oracle 7 through to 10i. I now no longer work with Oracle databases, but hope that these notes will continue to be of benefit to others.

About the author: is a dedicated software developer and webmaster. For his day job he develops websites and desktop applications as well as providing IT services. He moonlights as a technical author and consultant.