Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 260
  • Last Modified:

Just 1000 answers when trying to query Active Directory

Hello!
I am using a linked server to query Active directory and
SELECT * FROM OpenQuery(ADSI,'<LDAP://skolhem1/DC=skola,DC=sundsvall,dc=local>;(&(objectCategory=Person)(objectClass=user));name, adspath;subtree') where name='be89mape'
does work when I ask for one of the first 1000 users but not if I ask for any of the others. What I want to do is to compare the OU that is stored in the SQL-server with the OU the user actually belongs to in AD so that is why I don't want to give the ou in the LDAP-string.
I hope you understand the question...
Ylva
0
Ylvaho
Asked:
Ylvaho
  • 2
1 Solution
 
Anthony PerkinsCommented:
With Windows 2000 you are limited to a maximum of 1000.  You will have to get additional values using a range.
0
 
YlvahoAuthor Commented:
OK. There is no way around that limit? With Windows 2003 is it different?
Ylva
0
 
Anthony PerkinsCommented:
With Windows 2003 it is supporsedly 1500 (I have never tested it). See here for more info:

Searching Using Range Retrieval
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ldap/ldap/searching_using_range_retrieval.asp
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now