Instead of querying Active Directory through a linked server, you might be better off caching your AD data in an SQL database and then query it instead. You can use Integration Services by creating an OLE DB connection using "OLE DB PRovider for Microsoft Directory Services" and having a DataReader source with a query like:
SELECT physicalDeliveryOfficeName, department, company, title, displayName, SN, givenName, sAMAccountName, manager, mail, telephoneNumber, mobile FROM 'LDAP://DC=SOMECO,DC=COM' WHERE objectClass='User' and objectCategory = 'Person' order by mail
Using this method, you will still encounter a limit of 1000 lines for the results of an AD query (note that it is NOT recommended to try to increase this limit in AD, this means that the domain controller will not be overloaded). Sometimes it can be used a combination of queries to return a complete set of data, for example. names A - L and M - Z
Alternatively, you can use the CSVDE command-line utility in Windows Server to export your directory information to a CSV file and then import it into the SQL database (see http://computerperformance.co.uk/Logon/Logon_CSVDE_Export.htm for for more information on exporting AD data using CSVDE).
source share