Solved

Just 1000 answers when trying to query Active Directory

Posted on 2004-08-15
5
258 Views
Last Modified: 2012-06-27
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
Comment
Question by:Ylvaho
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 11810385
With Windows 2000 you are limited to a maximum of 1000.  You will have to get additional values using a range.
0
 

Author Comment

by:Ylvaho
ID: 11834201
OK. There is no way around that limit? With Windows 2003 is it different?
Ylva
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 500 total points
ID: 11834724
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question