Solved

How to query LDAP(Microsoft Active Directory Services) from IBM db2 UDB

Posted on 2012-04-10
1
1,014 Views
Last Modified: 2012-06-27
I found the following code to use SQL Server 2005 to query information in my Active Directory structure:

Found at: http://www.bravesoft.com/blog/?p=24

EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5',ADSDSOObject', 'adsdatasource'
....
EXEC master..xp_sprintf @cmdstr OUTPUT, 'SELECT mail, employeeID, displayname, distinguishedName FROM OPENQUERY( ADSI, ''SELECT distinguishedName, displayname, employeeID, mail FROM ''''LDAP://DC=mycompany, DC=int''''WHERE objectCategory = ''''Person'''' AND SAMAccountName = ''''%s*'''''' )'

Open in new window


This code works from SQLServer2005, but can someone point me to an equivalent method from a IBM db2 UDB database?

My goal is to (at a minimum) compare data from my H.R. system to the user attributes in Active Directory. If I can query AD and place the results in a table on my db2 box, I can accomplish this.

Thanks in advance.
0
Comment
Question by:bisdmain
1 Comment
 
LVL 37

Accepted Solution

by:
momi_sabag earned 500 total points
ID: 37830401
db2 does not have a built in interface to active directory like sql server has
you will have to write a user defined function that does that
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

I have put this article together as i needed to get all the information that might be available already into one general document that could be referenced once without searching the Internet for the different pieces. I have had a few issues where…
Experts-Exchange users below are the steps you can follow to upgrade your Lync server to latest CU's or cumulative updates. Note: Perform it during non-production hours.   Step 1: Backup your lync and SQL server database. Follow below article: h…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now