I have an ADSI connection on my SQL Server (2005) and I can query it using openquery. Is there a way to create new accounts (and / or) to edit existing ones?
Also, I would like to use openquery to access the data, but it looks like the only solution.
Here is an example request that I use:
SELECT
samaccountname,
department,
mail,
displayName,
employeeid
FROM OPENQUERY( ADSI,
'
SELECT samaccountname, department, mail, displayName, employeeid
FROM ''LDAP://DC=MyDomainName,DC=MyDomainExtension''
WHERE objectCategory = ''Person'' and objectClass= ''user''
'
)
thanks
source
share