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 2005 Forums
 Transact-SQL (2005)
 querying active directory through openquery

Author  Topic 

b.veenings
Yak Posting Veteran

96 Posts

Posted - 2007-11-22 : 03:18:10
hi, does anyone know what to use as like operator when using AdsDsoObject

SELECT *
FROM OPENROWSET(
'AdsDsoObject'
,'User ID=bveenings;Password=*******;ADSI Flag=0x11;Page Size=10000'
,'SELECT samaccountname
, mail
, userPrincipalName
, lastlogon


FROM ''LDAP://DC=Corp,DC=Infotechnology,DC=Nl''
where ''samaccountname'' like ''%_%'''
)

thnx
Ben

Need an SQLDB consultant?
check www.veeningsengineering.nl
   

- Advertisement -