Showing posts with label ldap. Show all posts
Showing posts with label ldap. Show all posts

Thursday, March 8, 2012

ADSI LDAP Query 1000 Record limit for MSSQLServer linked server

Hi,
I have successfully set and used a linked server to query ADSI.
Since this question also concerns MSSQLServer, I've cross posted it --
I hope this is not a breach of etiquette.

I have successly created a view based on the linked server.
Unfortunately, it only shows 1000 records, and there does not seem to
be any way to set the Page Size.

I found the following:
http://support.microsoft.com/defaul...kb;en-us;243281

Which seems to imply that the default can be set by changing registry
key: "HKEY_CURRENT_USER\Software\Policies\Microsoft\Wind ows\Directory
UI"

I have set this key, and also set it for the user account under which
MSSQLServer runs. The value persists after a reboot. The Domain Group
policy sets the default to 15000.

This behaviour is not restricted to the linked server. If I use the
script found here:http://hacks.oreilly.com/pub/h/1121 I can access more
than 1000 records, but only if I set the "Page Size" property. If I
comment it out to let the default hold, it is 1000.

It must be settable SOMEWHERE or the whole linked server thing is of
very limited use.

At present, the best solution I've been able to come up with is to use
the above script modified to run as a DTS package. Yuck.

TIA,
BM>This behaviour is not restricted to the linked server. If I use the
>script found here:http://hacks.oreilly.com/pub/h/1121 I can access more
>than 1000 records, but only if I set the "Page Size" property. If I
>comment it out to let the default hold, it is 1000.

Yes, that's the way it was designed - if you don't use paged searches,
AD will limit you to about 1000 objects.

So if you want more than 1000 objetcs back, just set the "Page Size"
options - where's the problem with that??

Marc
__________________________________________________ ______________
Marc Scheuner ** mscheuner -at- mvps.org ** http://adsi.mvps.org
Microsoft MVP for Directory Services Programming
http://www.dirteam.com/blogs/mscheuner/default.aspx
http://groups.yahoo.com/group/ADSIANDDirectoryServices/|||No problem at all.
Now, can you tell me where you set page size when you have ADSI set up
as a linked server? I've not been able to find it, as I mentioned in
my post.

The reference given about setting the "Directory UI" key does not seem
to work.

Thanks,
BM

ADSI and Reporting Services Permission issue.

I have a stored proc that calls on a view in sql server. The view is
actually my Active Directory LDAP query. I have already created a
linked server and account for my user name jkim.
I have a report that polls data from this stored proc. After I set the
datasource which uses an account "sqluser", I try to the run the report
and I get this:
An error has occurred during report processing. (rsProcessingAborted)
Get Online Help
Query execution failed for data set 'DispatchActivity'.
(rsErrorExecutingCommand) Get Online Help
OLE DB provider 'ADSDSOObject' reported an error. The provider
indicates that the user did not have the permission to perform the
operation.
The data source uses the account "sqluser" which is an account that's
stored in the report server. I'm pretty sure this is what's causing
the error. Does 'sqluser' have to be an actual Active Directory user
for it to have access to the ADSDSOObject?
I don't know if I'm making any sense.nevermind, i figured it out.
i didn't check the "use as windows authentication" checkbox in the
datasource.