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

In this tutorial, let’s have a look at the reason for Error “ORA-12162: TNS:net service name is incorrectly specified” in Oracle and how to fix it.

Oracle Error Message

This is how the Oracle error message ORA-12162 looks like in general.

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

Reason for the Error

This error message (ORA-12162) is sometimes misleading. The message states that there is an issue with the tnsnames.ora file settings where the service name is specified incorrectly. But the message “ORA-12162 TNS:net service name is incorrectly specified” appears because you have set an incorrect ORACLE_SID value.

The connect descriptor corresponding to the net service name in TNSNAMES.ORA or in the directory server (Oracle Internet Directory) is incorrectly specified.

Solution

If using local naming make sure there are no syntax errors in the corresponding connect descriptor in the TNSNAMES.ORA file. If using directory naming check the information provided through the administration used for directory naming.

For example,

Ensure that you set your $ORACLE_HOME environment variable if you are running Oracle on Windows. If you are using Linux, try setting both ORACLE_HOME and $ORACLE_SID.

Share:

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

Oracle Error Message CLSGN-32767: Internal error. Reason for the Error An unexpected error occurred. Solution Examine the message(s) that accompany...
Oracle Error Message CLSGN-00211: OCR batch operation failed. string Reason for the Error Setting a set of Oracle Cluster Registry...
Oracle Error Message CLSGN-00210: failed to get value for OCR key “string”. string Reason for the Error It was not...