ORA-12154 🗃️ SQL

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

The Oracle client couldn’t find the alias in tnsnames.ora (or the naming method can’t resolve it).

Seen on: SQL

Meaning

The client looks up the alias in tnsnames.ora under TNS_ADMIN. Using EZConnect (host:port/service) avoids tnsnames entirely.

Common causes

  • Alias missing from tnsnames.ora
  • TNS_ADMIN not set / wrong file used
  • Typo in the alias

⚡ Quick fix

  1. Use EZConnect: host:1521/servicename
  2. Set TNS_ADMIN to the right folder
  3. Check the alias spelling

Detailed fix by platform

SQL

  1. sqlplus app/pass@//db.example.com:1521/ORCLPDB1

How to diagnose

  1. Alias — In tnsnames.ora?
  2. TNS_ADMIN — Which file?

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.