sp_addlinkedserver 'ADSI', 'Active Directory Service Interfaces', 'ADSDSOObject', 'adsdatasource'
SELECT * FROM OpenQuery
(
ADSI, --Name of the linked server for Active directory, created in step 1
'SELECT title, displayName, sAMAccountName, givenName
FROM ''LDAP://DC=TestDomain''
where objectClass = ''User'''
)
posted @ lunedì 31 agosto 2009 15:00