Wayne Rushing
asked on
Work around for issue retrieving description field from AD via LDAP
working on an ETL project where we need to tie information from the AD server to the ERP system to get SSO logins. I need to relate the Employee ID found in the ERP system to an Employee ID in the AD. I was trying to do this from SQL running in a SSIS package.
The problem is that the Employee ID in the AD is stored in the description attribute... i know... couldn't have been easy and stored in the EmployeeID or EmployeeNumber attribute right? I can connect to the AD and read the other attributes, but I get the "Could not convert the data value due to reasons other than sign mismatch or overflow" when trying to read the description attribute. After some research, I understand it is a common problem because LDAP reports that value as a multi-value. I found a supposed workaround on the Experts Exchange site, but that doesn't appear to work as it is also accessing via an OpenQuery (ADSI, ...... LDAP://..... query.
Just wondering if there is a work-around with SQL? or if it is possible to pull a list of the description and mail fields via .NET? if .NET, could you point me to some examples? While I do understand some C#/VB, I'm not an expert in that regard, especially when accessing AD.
Thanks
The problem is that the Employee ID in the AD is stored in the description attribute... i know... couldn't have been easy and stored in the EmployeeID or EmployeeNumber attribute right? I can connect to the AD and read the other attributes, but I get the "Could not convert the data value due to reasons other than sign mismatch or overflow" when trying to read the description attribute. After some research, I understand it is a common problem because LDAP reports that value as a multi-value. I found a supposed workaround on the Experts Exchange site, but that doesn't appear to work as it is also accessing via an OpenQuery (ADSI, ...... LDAP://..... query.
Just wondering if there is a work-around with SQL? or if it is possible to pull a list of the description and mail fields via .NET? if .NET, could you point me to some examples? While I do understand some C#/VB, I'm not an expert in that regard, especially when accessing AD.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad you figured out a solution. It looks like you are writing to a flat file and then I imagine you will import that file into a table using a separate SSIS step. We just did the INSERT statements in the C# script directly rather than a bulk import. I can see how using a file and importing it might be faster. However, I think that most of the performance issues are in querying Active Directory rather than inserting records.
ASKER
I actually ended up doing something similar, but slight different, so just wanted to share in case that helps others:
Open in new window