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.

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 AD Quirks

Author  Topic 

bholmstrom
Yak Posting Veteran

76 Posts

Posted - 2013-04-05 : 16:26:52
Good afternoon, I have a query that runs perfectly except it only works with a /CN=Users entry.

I am trying to a list of the top 500 of regular users.

This works:

SELECT * FROM OPENROWSET('ADSDSOObject', 'adsdatasource;',

'SELECT mail,displayName,title,distinguishedName

FROM ''LDAP://HostDC02/cn=users, DC=rfs, DC=com'' ')

This Fails:

SELECT * FROM OPENROWSET('ADSDSOObject', 'adsdatasource;',

'SELECT mail,displayName,title,distinguishedName

FROM ''LDAP://HostDC02, DC=rfs, DC=com'' ')

Any thoughts would be appreciated, have a great weekend

Bryan Holmstrom
   

- Advertisement -