Top 60 Oracle Blogs

Recent comments

Referencing LDAP for JDBC thin client connections….

Just a quick note, to mention something that I just recently discovered.  (Yes, this has been available since at least Oracle 10.1, but I wasn’t aware of it!)

When composing a JDBC thin client connect URL, we have been using something of the form:

This is fine, but if you have a mix of Oracle OCI clients and JDBC thin clients, and if the OCI clients are all configured to use an LDAP server for Net Service Name resolution, then, whenever you make any kind of reconfiguration, you need to update the LDAP server, and then still need to update the hardcoded connection information in the JDBC Thin URL.

However, what i recently discovered, is that it’s possible to define your JDBC Thin URL, thus:


So, now, the JDBC Thin connection will refer to the LDAP server for info on the ‘mydb’ connect string, and the LDAP server will return:


And now, when I update my centrally managed LDAP server, it’s seen by all my JDBC Thin clients as well as OCI clients.

So, yes, this has been around for many years, but I wasn’t aware of it. I’m sure you, my readers, are much sharper than I, and have known about it all along, and are saying “So, what’s new? What’s he going on about?” But, perhaps there are one or two that were not aware of this, so, I hope this little mini-blog entry helps someone out!

Thanks to Fred for this comment on my OpenLDAP blog post, that brought this to light for me: