DBAtlas · Database operations atlas

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

Oracle

What does it mean?

The service name (connect identifier / TNS alias) used in the connection could not be resolved. Oracle Net cannot map the given name to server/service information.

Why does it happen?

The alias is missing from tnsnames.ora, the TNS_ADMIN environment variable points to the wrong directory, the alias name is misspelled, EZConnect/LDAP naming configuration is missing, or the NAMES.DIRECTORY_PATH order in sqlnet.ora is wrong.

How to fix it

Verify that the alias you use is defined in tnsnames.ora. Test the connection: tnsping service_name. Make sure TNS_ADMIN points to the correct folder. Alternatively try EZConnect: app_user/password@host:1521/service_name. Check the NAMES.DIRECTORY_PATH = (TNSNAMES, EZCONNECT) line in sqlnet.ora.

Open in DBAtlas →

More from this engine