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 |
bholmstrom
Yak Posting Veteran
76 Posts |
Posted - 2013-04-03 : 13:38:16
|
I am getting this error when querying the Active DirectoryMsg 7321, Level 16, State 2, Line 27An error occurred while preparing the query "SELECT DisplayName, title,mail FROM 'LDAP://CBC-03/DC=jhcohn,DC=com' WHERE objectClass = 'Person' " for execution against OLE DB provider "ADsDSOObject" for linked server "ADSI". I am not the DOmain Admin, but the lady that is gets the same error.Here is the Code that linked the server:EXEC master.dbo.sp_addlinkedserver @server = N'ADSI', @srvproduct=N'Active Directory Services', @provider=N'ADsDSOObject', @datasrc=N'cbc-03.jhcohn.com' --AKA the full computer name of the AD serverHere is the query code:SELECT * FROM OpenQuery ( ADSI, 'SELECT DisplayName, title,mail FROM ''LDAP://CBC-03/DC=jhcohn,DC=com'' WHERE objectClass = ''Person'' ') Any ideas, thanks in advanceBryan Holmstrom |
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2013-04-03 : 14:59:29
|
what sql server version are you running?Jack Vamvas--------------------http://www.sqlserver-dba.com |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2013-04-03 : 15:47:06
|
Might want to look at this thread |
|
|
|
|
|
|
|