Here's what I put in:
$objConn->Properties("Page Size")->{Value} = 10;
(Also tried single quotes), but still get the same error.
Tried the DataDumper line as well... same issue
From: Michele Berg [mailto:mich...@gmail.com]
Sent: Thursday, April 21, 2011 11:57 AM
To: Gomes, Rich
Subject: Re: AD Page Size help
Hi Rich,
Try setting your page size to 10 using your original syntax. We've set our queries up a little differently.
However, this doesn't look like a page size issue. If it was, you wouldn't ever get to the MoveNext.
Do you have Data::Dumper loaded on your system? I'd use it, and then instead of doing a simple print within your while loop, I'd do
print Dumper($objRS->Fields(0)->Value);
If that doesn't work, I can send you the way that I set up my connection, because I know that it works.
Michele
On Thu, Apr 21, 2011 at 10:45 AM, Gomes, Rich <rich...@uniform.aramark.com> wrote:
Hi Michele,
Thanks for the tips.
Here is what I get for an error:
"The size limit for this request was exceeded.
Win32::OLE(0.1709) error 0x80072023: "The size limit for this request was
exceeded"
in METHOD/PROPERTYGET "MoveNext" at temp-perl-findallusers.pl line 62"
If I add this line:
$objConn->Properties('Page Size')->{Value} = 10;
"I get this for an error:
OLE exception from "ADODB.Connection":
Item cannot be found in the collection corresponding to the requested name
or ordinal.
Win32::OLE(0.1709) error 0x800a0cc1
in METHOD/PROPERTYGET "Properties" at temp-perl-findallusers.pl line 58"
Thanks,
Rich
From: Michele Berg [mailto:mich...@gmail.com]
Sent: Thursday, April 21, 2011 11:34 AM
To: Gomes, Rich
Subject: Re: AD Page Size help
Also, something you may want to consider - are you sure you're hitting a search limit? Depending on the structure of your domain and how deeply-nested it is, you may need to chase referrals in order to search sub-domains:
$objConn->Properties('Chase Referrals')->{Value} = ADS_CHASE_REFERRALS_ALWAYS;
Michele
On Thu, Apr 21, 2011 at 10:31 AM, Michele Berg <mich...@gmail.com> wrote:
When I set my page size, I set it like so:
$objConn->Properties('Page Size')->{Value} = 10;
Notice that the number you use here doesn't seem to limit the number of records returned by the query - it just affects behind-the-scenes ADSI processing. We originally tried 1000 but it occasionally hung; once we reduced it to 10 we had no more problems. The large page size seemed to allow some timeouts to occur.
hth,
Michele
On Thu, Apr 21, 2011 at 10:18 AM, Gomes, Rich <rich...@uniform.aramark.com> wrote:
I know this has been talked about a lot but I cannot seem to get my script to work.
I am trying to not hit the LDAP search limit but cannot seem to get the PageSize line correct
Any thoughts?
_____________________________________________________________________________
my $strDomainDN = "DC=mydomain,DC=com";
use Win32::OLE qw(in);
$Win32::OLE::Warn = 3;
my $strBase = "<LDAP://" . $strDomainDN . ">;";
my $strFilter = "(&(objectclass=user)(objectcategory=person));";
my $strAttrs = "name;";
my $strAttrs = "distinguishedName;";
my $strScope = "subtree";
my $objConn = Win32::OLE->CreateObject("ADODB.Connection");
$objConn->{Provider} = "ADsDSOObject";
$objConn->Open;
$objConn->{Properties}->{"Page Size"} = 100;
my $objRS = $objConn->Execute($strBase . $strFilter . $strAttrs . $strScope);
$objRS->MoveFirst;
while (not $objRS->EOF) {
print $objRS->Fields(0)->Value,"\n";
$objRS->MoveNext;
}
_______________________________________________________________________________
_______________________________________________
Perl-Win32-Admin mailing list
Perl...@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Admin mailing list
Perl...@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Admin mailing list
Perl...@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs