Solved

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

Posted on 2012-04-10
1
1,063 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

623 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