Copying Data from LDAP to SQL 2008


I have a SQL 2008 Server and I would like to copy some data from LDAP to the SQL Database and overwrite this information on regular basis.
I am not familiar with both systems and I need help how to start.
I have full access to SQL and also have an account to retrieve data from LDAP.
I may be able to access all the LDAP formation with Softerra LDAP Browser.
Thank you
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
you can use a linked server querying the LDAP:

HOWEVER, there is a big Heads UP:
the max rows you can retrieve in 1 query is 1000.
so, if you plan to query all AD users/computers/whatever, and the number of rows might, in some future, be more than that, you have to plan your queries in a way that it does this in bunches in an intelligent way to get all of the records ...

hope this helps
gothamiteConnect With a Mentor Commented:
Unfortunately there are many issues with using linked servers to query LDAP sources. The big one is that you cannot use the linked server to retrieve a multi-valued attribute. You just get an ugly error message if you try to do this. The best way I have found is by coding a CLR stored procedure/function to make use of the .net DirectorySearcher class. This is a bit involved but gives good results, lets you override the 1000 limit and lets you use multi-valued attributes.
All Courses

From novice to tech pro — start learning today.