Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Update Active Directory through SQL

452 views
Skip to first unread message

Radtherapy

unread,
Sep 12, 2008, 1:23:02 PM9/12/08
to
Windows 2003 server, using SQL Server 2005.

We have created a Linked Server to Active Directory and have a table that is
populated based on the users (EmployeeList). The EmployeeList table has an
identity column that we would like to use as the EmployeeID in AD, updated
through SQL.

Here's a sample:
UPDATE OPENQUERY (ADSI,
'SELECT EmployeeID, sn FROM
''LDAP://loki/ou=WestClinics,ou=Clinics-Mainland,ou=XXX,dc=YYY,dc=local''
WHERE objectCategory = ''Person'' AND objectClass = ''user''')

SET [EmployeeID] = 186

WHERE [sn] = 'Smith'

Whenever I try to execute, I get the following:
Msg 7390, Level 16, State 2, Line 2
The requested operation could not be performed because OLE DB provider
"ADSDSOObject" for linked server "ADSI" does not support the required
transaction interface.

So my question is - is it possible to update Active Directory through SQL?

LAIR

unread,
Oct 15, 2008, 9:33:01 AM10/15/08
to
Hi,

Yes, is possible. I am currently working an a project that updates active
directory using a join from a view in sql server. I am using the employeeId
for matching the employee in sql server and in AD.

The problem that I am having is that when I try to update all employees from
sql into ad is updating all employees with the same information from the
first record returned.

I got a class for this that maybe if you haven't find a way for your project
I can share with you.

Let me know if you were able to complete your project.

jj12

unread,
Dec 8, 2008, 5:15:01 PM12/8/08
to
There is a free tool available which you can use to query Active Directory
using sql like syntax you can download it from http://www.ldapsoft.com

For Update and insert download the trial version of Active Directory Admin &
Query Tool from
http://www.ldapsoft.com/activedirectoryadmintool.html

0 new messages