My Oracle Support Banner

ORA-12154 When Using Long SQLNET Alias in DBQ Property of ODBC Connection String or TNS Service Name of DSN (Doc ID 1340407.1)

Last updated on FEBRUARY 21, 2019

Applies to:

Oracle ODBC Driver - Version and later
Microsoft Windows (32-bit)
***Checked for relevance on 12-Aug-2016***


Using a long SQLNET Alias in the DBQ property of your ODBC connection string for a DSN-LESS ODBC Connection fails with:

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

Here is an example of the connection string :

connectionstring="Driver={Oracle in OraDb11g_home2};DBQ=(DESCRIPTION=(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))(CONNECT_DATA=(SERVER = DEDICATED)(SERVICE_NAME = <SERVICENAME>;UID=<USERID>;pwd=<PASSWORD>;"

Please note trying to use the fully qualified connection string in the DSN setup option TNS Service Name will also result in the Ora-12154 error.




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

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

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