LDAP : tnsping = TNS-03505: Failed to resolve name using LDAP - sqlplus connection error ORA-12154: TNS:could not resolve the connect identifier specified - connect to DB via LDAP/OID

(Doc ID 2301489.1)

Last updated on NOVEMBER 27, 2017

Applies to:

Oracle Net Services - Version 11.2.0.4 and later
Oracle Internet Directory - Version 11.1.1.9.0 and later
Information in this document applies to any platform.

Symptoms

sqlplus system@T010 :
===============

SQL*Plus: Release 12.2.0.1.0 Production on Mon Aug 21 13:11:14 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Enter password:
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified 

tnsping T010 :
=========

TNS Ping Utility for Linux: Version 12.2.0.1.0 - Production on 21-AUG-2017 12:46:57
Copyright (c) 1997, 2016, Oracle. All rights reserved.
Used parameter files:
/dbprog/oracle/product/12.2.0.1.1/network/admin/sqlnet.ora
TNS-03505: Failed to resolve name 

Successful ldapsearch done on LDAP server :
=============================

ldapsearch -h <OS-host-name> -p 389 -D "cn=orcladmin" -w XXXXXX -b "cn=T010,cn=OracleContext,dc=<domain_name>,dc=no" -s base "objectclass=*"
cn=T010,cn=OracleContext,dc=statoil,dc=no
objectclass=top
objectclass=orclNetService
cn=T010
orclnetdescstring=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=db hostname)(PORT=10001)))(CONNECT_DATA=(SERVICE_NAME=T010)))
orclnetdescname=000:cn=DESCRIPTION_0

Changes

New LDAP entry or modification in the LDAP Server OR OID Parameters

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