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 APRIL 03, 2017

Applies to:

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

Symptoms

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 = ORCL2;UID=SCOTT;pwd=TIGER;"


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.

Cause

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 hundreds of Community platforms