OLEDBException: ORA-12154: TNS Could Not Resolve Service Name (Doc ID 256936.1)

Last updated on JULY 22, 2017

Applies to:

Oracle Provider for OLE DB - Version 10.2.0.1 to 11.2.0.4 [Release 10.2 to 11.2]
Microsoft Windows (32-bit)

***Checked for relevance on 22-Jul-2017***


Symptoms

While using ASP.NET with Oracle Provider for OLEDB you encounter:

OLEDBException: TNS-12154: TNS could not resolve service name

The same connection string is successfully used outside of IIS with a simple OLE DB test application so the alias is valid.

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