FancyPrairie
Programmer
I've added Active Directory as a linked server so I can query Active Directory using OpenQuery. The query looks something like this:
The problem with this query is that it only displays 1000 records. I know I can change the MaxPageSize on the server, but, for various reason, cannot do that.
Supposedly I should be able to change the Page Size using OpenRowSet rather than OpenQuery. But I still can't seem to get the query to display more than 1000 records.
Here's my query. What am I doing wrong?
Code:
SELECT *
FROM OPENQUERY(ADSI,
'SELECT sn
FROM ''LDAP://OU=whatever,DC=whatever''
WHERE objectCategory = ''Person'' AND
objectClass= ''user'' ')
Supposedly I should be able to change the Page Size using OpenRowSet rather than OpenQuery. But I still can't seem to get the query to display more than 1000 records.
Here's my query. What am I doing wrong?
Code:
SELECT *
FROM OPENROWSET('AdsDsoObject', 'User ID=Me;Password=MyPassword;ADSI Flag=0x11;Page Size=10000',
'SELECT sn
FROM ''LDAP://OU=whatever,DC=whatever''
WHERE
objectCategory = ''Person''
AND objectClass = ''user'' ')