Discussion Locked

Sync AD user data with user Table in SQL

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,

I have a user repository in Active Directory and a user table in SQL Server and both are in sync . But, whenever any change occurs to the user object or a new user added to AD I need to sync that change with Sql server table. how can I map the user in AD to the user existing in a table in SQL server. Does AD associates an ID for the user so that I can map that to my unique ID in user table in SQL server?

i am trying to do a programme which reads this mapping information and sync the data from AD to SQL server. which is the best way to do this?

Please help me in resolving this issue.

thanks in advance

1 reply

by p.j.hutchison

Each user id in AD is unique and identified by the CN attribute. You could write a Visual Basic program to read all users in AD extract the information (using ActiveDS Type Library - ADSI)
to read info from AD using LDAP and connect to the SQL server using ADO (ActiveX Data Objects)
and update the existing tables using updates.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/anch_activediradsi.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/dasdkadooverview.asp

This discussion is closed to new replies.