Solved

Update Active Directory from SQL Server

Posted on 2010-11-10
8
1,021 Views
Last Modified: 2013-12-24
Hi Experts,

I am wanting to update Active Directory from SQL server 2005, I think i might be able to do it through a Linked Server but i cannot find information on how to do this. Essentially i want to be able to update ipPhone from a result set in SQL server. some syntax or a relevent link for updating Active Directory would be much appreciated.

0
Comment
Question by:adammet04
8 Comments
 
LVL 7

Expert Comment

by:BobintheNoc
ID: 34107991
If you can get your content from SQL, you could use a script/Batch file to use the command line tool:  LDIFDE to directly edit the AD user objects.

LDIFDE.exe will take a text file (like csv) as an input.  
0
 
LVL 8

Expert Comment

by:guvera
ID: 34110183
0
 
LVL 3

Author Comment

by:adammet04
ID: 34214372
Thanks for the responses however none of these have worked for me.

What i want is to know is the basic syntax to update a entry in Active Directory using LDAP (Eg phone number) from an entry in a database.
0
 
LVL 3

Author Comment

by:adammet04
ID: 34364853
Points now at 250..please help!
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 6

Expert Comment

by:jwilleke
ID: 34369075
Syntax in what language?

AD is as you apparently know, LDAP and there are lots of different applications that have LDAP libraries.

We have some links here:
http://ldapwiki.willeke.com/wiki/LDAPPrograming

-jim
0
 
LVL 3

Author Comment

by:adammet04
ID: 34486137
Jwilleke

As per OP i want to update active directory from (i guess) a SQL statement.
Eg: query out a bunch of users and their phone numbers and update Active Directory fields accordingly. Im guessing i might need to use an LDAP query to do this, but i am having trouble identifing what i need to do or even look at!
I guess powershell might also be a valid solution as well.?

Im hoping for some information or syntax on how to do it so i can work through how to get it happening
0
 
LVL 6

Accepted Solution

by:
jwilleke earned 500 total points
ID: 34489508
Pwoershell may work but I am an LDAP guy.

I would recommend get an LDAP browser and look at your AD.
You will be able to see which attributes you would need without the MMC naming clutter.

I use Apache Studio (Free) but you might want to look at "Active Directory Explorer or Softerra's products which are windows specific.
http://ldapwiki.willeke.com/wiki/LDAP%20Browsers

Using SQL against AD will probably be problematic as AFAIK, there is no direct SQL interface.
I have seen some third parties that translate SQL calls to LDAP but do not remember any of them off-hand.

Microsoft management use LDAP over-the-wire to communicate with AD.

Hope that helps.
0
 
LVL 3

Author Closing Comment

by:adammet04
ID: 34748714
Will have to use LDAP explorers and Powershell to do this. no easy way in SQL to get it done
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

This article describes some very basic things about SQL Server filegroups.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 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

10 Experts available now in Live!

Get 1:1 Help Now