Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Subhani
Starting Member
1 Post |
Posted - 2005-03-21 : 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 Directory.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 queryexec sp_addlinkedsrvlogin 'ADSI',false,'CTS\114944','CN=Administrator,OU=Sales, DC=actived,DC=CTS,DC=com', 'karthi_123'SELECT *FROM OPENQUERY( ADSI,'SELECT mail,Name,samaccountname FROM ''LDAP://ctsincocfaa'' where samaccountname=''114944''')Error Message::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]. |
|
|
|
|