Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Connection string format to connect to Oracle DB through LDAP

Venkatasuresh-OracleNov 14 2012 — edited Nov 16 2012
Hi,

I have an Oracle database and its details are configured in LDAP. I have C# code from which I want to connect to Oracle DB using LDAP details. So i have written code to connect to the Oracle DB, but not able to connect. Getting error at con.Open() statement : "ORA-12154: TNS:could not resolve the connect identifier specified".

Code:
--------
string constr = "Data Source=@ldap://abc.pq.xyz.com:11389/myldap,cn=OracleContext,dc=pq,dc=xyz,dc=com;User Id=MyDB;Password=MyPass";

OracleConnection con = new OracleConnection(constr);
con.Open();

I need help in forming the connection string.
This post has been answered by Mark Williams-Oracle on Nov 15 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 14 2012
Added on Nov 14 2012
3 comments
10,146 views