Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Is there a work around to get all groups (number of groups is more than MaxPageSize)

0 views
Skip to first unread message

techie

unread,
Apr 4, 2006, 1:38:33 AM4/4/06
to

In my application I am trying to fetch all groups using ldap_search from
active directory.
But it does not return more than MaxPageSize(default value is
1000).Though I can get all group by setting MaxPageSize to 3000 in
active directory server.
My question is:
Is there a work around to get all groups without bothering about the
value set for MaxPageSize?
Thanks in advance.
regards,
Arvind

--
techie
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

/\/\o\/\/ [MVP]

unread,
Apr 4, 2006, 10:30:01 AM4/4/06
to
you can set the pagesize on the client (below 900), the search will get all
records in pages if set size.

e.g.

$searcher.PageSize = 900

gr /\/\o\/\/

Richard Mueller

unread,
Apr 4, 2006, 9:53:25 PM4/4/06
to
Hi,

In ADO, once you set a Page Size (any value less than 1000), you turn on
paging, which is all you really need. I've never used any value but 100.
I've never seen a discussion of the optimal value, but it would probably
vary depending on the query. A large value might be less efficient.

--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net

"/\/\o\/\/ [MVP]" <oM...@discussions.microsoft.com> wrote in message
news:B1E3319F-3A21-466D...@microsoft.com...

k a @mvps.org Alex K. Angelopoulos [MVP]

unread,
Apr 10, 2006, 12:40:10 AM4/10/06
to
Richard,

Can you elaborate on this? Since I've never had to deal with more than 1000
or so elements in ADSI queries, I generally have set page size to 1000 - but
I thought that was the maximum records you would get. In other words, I had
thought that if I had 1290 computers in ADSI and did a query with page size
set to 1000 explicitly that I would only get the first 1000 back unless I
explicitly did something to advance the page.

If I understand you correctly, you don't have to worry about anything once
you set paging no matter how many results there are?


"Richard Mueller" <rlmuelle...@ameritech.NOSPAM.net> wrote in message
news:uy6l7OFW...@TK2MSFTNGP02.phx.gbl...

/\/\o\/\/

unread,
Apr 10, 2006, 1:57:09 AM4/10/06
to
Alex, your right on this,
the pasesize only has to be below 1000 (or the custom max page size set
in AD)

the 900 was a "typo" just what I normally do.

only with MemberOf() it's worse you need to use a searcher, to get all


gr /\/\o\/\/

Richard Mueller

unread,
Apr 10, 2006, 9:53:29 AM4/10/06
to
Hi,

The following link has a discussion on Page Size:

http://www.microsoft.com/technet/community/columns/scripts/sg0405.mspx#E4H

If paging is not turned on, you can only retrieve 1000 records in a
recordset. Once paging is turned on, the recordset returns to the server as
many times as required to retrieve all records matching the query, no matter
how many. Page Size is the number of records returned each time. You can
test by setting Page Size to a small number, like 10.

There is also a limit to how many values of a multi-valued attribute (like
memberOf) can be returned. This limit is also 1000, but can be overcome by
using Range Limits.

--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net

"/\/\o\/\/" <n...@spam.mow> wrote in message
news:O$gReOGXG...@TK2MSFTNGP05.phx.gbl...

/\/\o\/\/ [MVP]

unread,
Apr 10, 2006, 10:26:02 AM4/10/06
to
for who is interested, I posted 2 samples (in Monad) here :

http://mow001.blogspot.com/2006/04/large-ad-queries-in-monad.html

1) for queries above 1000 objects (simple just set pagesize)
2) for groups with more as 1500 Members (do paging yourself)

gr /\/\o\/\/

0 new messages