My Oracle Support Banner

Database Link fails with ORA-12154 even after setting TNS_ADMIN environment variable (Doc ID 470933.1)

Last updated on APRIL 10, 2020

Applies to:

Oracle Net Services - Version to [Release 9.0.1 to 12.2]
Oracle Database - Enterprise Edition - Version to [Release 19]
Information in this document applies to any platform.
This issue can occur on any platform and is limited in scope to the ORA-12154 error when attempting to use a database link or dblink.


Following the creation of a database link between 2 databases.  The database link gets created but you
are unable to select across the dblink from a client.

The following error is returned when you attempt select * from dual@linkname;

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




This is likely a new database link or the environment has changed.  If $TNS_ADMIN has been set recently, this article may apply.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.