Skip to content
May 27, 2012 / doganay

ORA-12154: TNS:could not resolve the connect identifier specified

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,


Problem:

ORA-12154: TNS:could not resolve the connect identifier specified

Solution:

  • add this line to /etc/hosts:
    127.0.0.1 localhost.localdomain localhost
  • If you are using local naming (tnsnames.ora file):
  • Make sure that “TNSNAMES” is listed as one of the values of the NAMES.DIRECTORY_PATH parameter in the Oracle Net profile (sqlnet.ora)
  • Verify that a tnsnames.ora file exists and is in the proper directory and is accessible.
  • Check that the net service name used as the connect identifier exists in the tnsnames.ora file.
  • Make sure there are no syntax errors anywhere in the tnsnames.ora file. Look for unmatched parentheses or stray characters. Errors in a tnsnames.ora file may make it unusable.
  • If you are using directory naming:
  • Verify that “LDAP” is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (sqlnet.ora).
  • Verify that the LDAP directory server is up and that it is accessible.
  • Verify that the net service name or database name used as the connect identifier is configured in the directory.
  • Verify that the default context being used is correct by specifying a fully qualified net service name or a full LDAP DN as the connect identifier
  • If you are using easy connect naming:
  • Verify that “EZCONNECT” is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (sqlnet.ora).
  • Make sure the host, port and service name specified are correct.
  • Try enclosing the connect identifier in quote marks. See the Oracle Net Services Administrators Guide or the Oracle operating system specific guide for more information on naming.

Leave a comment