Is it possible to pull name & email from Active Directory using SSMS w/o a linked server connection?
And this would be using SQL 2008
- Edited by IndigoMontoya 18 hours 14 minutes ago
Technology Tips and News
Is it possible to pull name & email from Active Directory using SSMS w/o a linked server connection?
And this would be using SQL 2008
Hello,
You can use the OPENDATASOURCE (Transact-SQL) function, here you can use a individual connection string.
Hello,
You can use the OPENDATASOURCE (Transact-SQL) function, here you can use a individual connection s
In MSDN you always have the Option to switch to any other available version, so yes, you can use it in SQL Server 2008
I tried this query
SELECT * FROM OPENROWSET('ADSDSOObject', '','SELECT cn, ADsPath FROM ''LDAP://DC=Fabricam,DC=com'' WHERE objectCategory=''group'' AND cn=''D*''')
which presents an error of
Msg 7321, Level 16, State 2, Line 1Msg 7321, Level 16, State 2, Line 1I received a similar issue with the "linked server "(null)"" error with a different provider. To resolve it, I had to change the provider properties and enable "Allow inprocess". Depending on your query, you may need to enable "Dynamic parameter" as well.
An error occurred while preparing the query "SELECT cn, ADsPath FROM 'LDAP://DC=Fabricam,DC=com' WHERE objectCategory='group' AND cn='D*'" for execution against OLE DB provider "ADSDSOObject" for linked server "(null)".