I have been trying to configure a linked server to AD and have found plenty of write ups on how to do it, but have had zero luck with getting it to work. I also read that the ability was removed after SQL 2008; is that correct? I am running 2014 and am seeing the following error trying to expand the tree:
TITLE: Microsoft SQL Server Management Studio
------------------------------
Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Cannot obtain the required interface ("IID_IDBSchemaRowset") from OLE DB provider "ADSDSOObject" for linked server "ADSI". (Microsoft SQL Server, Error: 7301)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=12.00.4100&EvtSrc=MSSQLServer&EvtID=7301&LinkId=20476
Then the following error when trying to query:
SELECT * FROM OpenQuery(ADSI, 'SELECT displayName FROM ''LDAP://<DOMAIN>/DC=DOMAIN,DC=<DOMAIN>'' WHERE objectCategory=''User'' ')
Msg 7321, Level 16, State 2, Line 1An error occurred while preparing the query "SELECT displayName FROM 'LDAP://----/DC=----,DC=----' WHERE objectCategory='User' " for execution against OLE DB provider "ADSDSOObject" for linked server "ADSI".
The linked server is set for 'Be made by the login's current security context' and local to remote is configured SA to a domain account we use for lookups.
It does not seem to matter if I am logged in to the server with SQL or Windows credentials. Thank you in advance for any gui