Monday, January 10, 2011

ORA-12162: TNS:net service name is incorrectly specified

Always check out the original article at for latest comments, fixes and updates.
ORA-12162: TNS:net service name is incorrectly specified
If you see this message, probably you tried to connect to an oracle instance without providing a service name on a linux/unix box, for instance:
This command may succeed only if in the client environment exists a variable called ORACLE_SID containing a default service name. For instance in the case of Oracle XE, the environment variable ORACLE_SID must contain the string XE. You can check whether such variable is currently defined for the current OS user by executing the command EXPORT on a linux/unix box.

On Windows boxes apparently ORA-12162 is replaced by ORA-12560 until 10gR2, but i could not verify this on more recent releases.
ORA-12560: TNS:protocol adapter error
This error is returned both when ORACLE_SID is undefined as environment variable or as registry key or when its value is incorrect. I ignore if there can be different scenarios leading to ORA-12162 on Windows platforms.

See message translations for ORA-12162 and search additional resources.

No comments:

yes you can!

Two great ways to help us out with a minimal effort. Click on the Google Plus +1 button above or...
We appreciate your support!

latest articles