Posted - 03/21/2005 : 04:44:41
| I want to create a login through "sp_addlinkedsrvlogin" to the "ADSI"
linked server inorder to access Active Directory to fetch email addresses of
the users present in active directory.
I want to use my sql Login to execute the query to fetch details from Active
Can any one help me with the query that will let my sql login to access
Active Directory using distributed query.
I am getting the following error while executing the query
exec sp_addlinkedsrvlogin 'ADSI',false,'CTS\114944',
'CN=Administrator,OU=Sales, DC=actived,DC=CTS,DC=com', 'karthi_123'
FROM OPENQUERY( ADSI,'SELECT mail,Name,samaccountname FROM
''LDAP://ctsincocfaa'' where samaccountname=''114944''')
An error occurred while preparing a query for execution against OLE DB provider 'ADSDSOObject'.
OLE DB error trace [OLE/DB Provider 'ADSDSOObject',ICommandPrepare::Prepare returned 0x80040e14].