November 14, 2014 at 8:20 am
I faced with AD limitations on my work and the best solution i choosed - use MSADHelper.dll by Igor Kovalenko.
It works perfect.
November 15, 2014 at 5:00 am
I would suggest that this article be removed. There are so many things wrong with it ...
November 18, 2014 at 11:02 am
The suggestion to remove the article because the author incorrectly identifies the 1000 row limit as being imposed by OPENQUERY and not LDAP is no reason to remove the article. We learn much more from mistakes than virtually any other source. I'm sure that this lesson will stick with many readers, who were not previously familiar with the issue, precisely because of the error in the articles' content.
By the way, I got around the LDAP limitation by creating a view that simply UNION-ed the queries together based on first 2 numbers of the EmployeeID. Here's a snippet:
Create VIEW [ADInfo].[vw_AD_Extract]
AS
SELECT
[DisplayName], [DistinguishedName], Department, [First Name], [Last Name], sAMAccountName, TelePhoneNumber, mail, Title,EmployeeNumber, ObjectGUID
FROM
(
Select [DisplayName], [DistinguishedName], Department, givenName [First Name], sn[Last Name], sAMAccountName, TelePhoneNumber, mail, Title,EmployeeNumber, ObjectGUID
FROM OpenQuery(ADSI,
'<LDAP://COMPANYNAME.com>;(&(objectCategory=Person)(objectClass=user)(EmployeeID=00*));DisplayName, DistinguishedName, Department, GivenName, SN, sAMAccountName, TelePhoneNumber, mail, Title, EmployeeNumber,ObjectGUID' )
AS derivedtbl_10
UNION
Select [DisplayName], [DistinguishedName], Department, givenName [First Name], SN [Last Name], sAMAccountName, TelePhoneNumber, mail, Title,EmployeeNumber, ObjectGUID
FROM OpenQuery(ADSI,
'<LDAP://COMPANYNAME.com>;(&(objectCategory=Person)(objectClass=user)(EmployeeID=01*));DisplayName, DistinguishedName, Department, GivenName, SN, sAMAccountName, TelePhoneNumber, mail, Title, EmployeeNumber,ObjectGUID' )
AS derivedtbl_9
Viewing 3 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply