Oracle Solution for Error ora-12162

Solution for Oracle Error ORA-12162

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

What triggered the Error:

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

What should we do to fix it:

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.