Solved

Update Active Directory from SQL Server

Posted on 2010-11-10
8
1,055 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
[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
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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 3

Author Comment

by:adammet04
ID: 34364853
Points now at 250..please help!
0
 
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
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…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

630 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