I am trying to link to our active directory but without much success. I have found some useful articles on it but can't get them working. http://www.sqlservercentral.com/Forums/Topic890278-149-1.aspx
The main theme seems to be that 1st you create a linked server using:
sp_addlinkedserver 'ADSI', 'Active Directory Service Interfaces', 'ADSDSOObject', 'adsdatasource'
...then you create a view using something like...
SELECT * FROM OpenQuery
'SELECT title, displayName, sAMAccountName, givenName, telephoneNumber, facsimileTelephoneNumber, sn
where objectClass = ''User''')
I keep getting this error...
"The provider indicates that the user did not have the permission to perform the operation."
So i changed security on the linked server to ...
"Be made using this security context" using Remote Login : DOMAIN\administartor With Password : XXXX.
Now i keep getting this error...
"An error occurred while preparing the query"
Can anyone shed any light on this for me.