Link to home
Create AccountLog in
Avatar of John Esraelo
John EsraeloFlag for United States of America

asked on

SQL: Updating Active Directory from SQL

Hello team,

I was wondering if someone can show me, share script with me, and/or explain if it is possible to update the AD (active directory) attributes from SQL / TSQL rather than ADO via C# or VB/VBA.

thx

FYI: our AD stored information needs a serious over-haul and manually will take for ever
Avatar of arnold
arnold
Flag of United States of America image

You would script the process that will go through the AD structure and then get the variations from a database or a file.

Does your database already have all the AD information?

There are many examples in vbscript, powershell, c# available that deal with accessing and modifying data in the AD.  Similar scripts to access data in a database exists.  You would need to combine the examples to achieve your ends.
ASKER CERTIFIED SOLUTION
Avatar of edtechdba
edtechdba
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Also, here are a few links that were helpful for me when I created this process.

List of LDAP Attributes Supported by ADMP
http://www.manageengine.com/products/ad-manager/help/csv-import-management/active-directory-ldap-attributes.html

How To Use the Directory Service Command-Line Tools to Manage Active Directory Objects in Windows Server 2003
http://support.microsoft.com/kb/322684
Avatar of John Esraelo

ASKER

Arnold,

Thank you for the quick response.  Yes, I currently been using the AD information by having the AD DB linked to one of my servers and constantly get information. In fact, to speed up the process of some of the interfaces and functions; I have a scheduled task that loads the AD needed fields onto a local table throughout the course of a day.

However, we are interested in writing back as well.  It would be time saving and beneficial if that could be performed in sql solely.


JohnE
EdTechDBA (Ed),

Thank you for the great piece of information.  I believe this might be the solution for us as well.  I am going to read this and see how that works for me but mean while I would like to submit your points.
Thank you again and looking forward in hearing back from you in the near future.


JohnE