SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Importing data from Active Directory into SQL Server Table


Importing data from Active Directory into SQL Server Table

Author
Message
dbman
dbman
Say Hey Kid
Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)

Group: General Forum Members
Points: 681 Visits: 1537
Hello


I am having a little trouble in importing data from Active directory into SQL Server table. I have been using the following tutorial to do so: http://dataqueen.unlimitedviz.com/tag/ado-net/

So far i have created a package with a ADO NET source with the following SQL Command: Select displayname FROM 'LDAP://Ourserver' Where Objectclass = 'User'

When i have gone to preview the query in the ADO NET Source editor i get the message: Warning. The data type 'system.object' found on column displayname is not supported for the ADO.NET Source. This column will be converted to DT_NTEXT.

The DisplayName field in my SQL Server table is a Varchar(50)

After the warning i click ok. However my ADO Net Source task has a warning sign that appears next to it.

The message next to the ADO Net Source states: The data type system object found on column displayname is not supported for ADO NET.

I have used a Data Conversion task to convert data type DT_NTEXT to unicode string [DT_WSTR]

My Destination source is a OLE DB Destination. I also get a red cross next to my OLE Destation stating:

Columns DisName and DisplayName cannot convert between unicode and non-code string data types.


In our active directory folders we have various OU folders:

I would like to create multiple tasks to be able to import different OUs. Each OU is based on a certain depot.

e.g OU=Birmingham
e.g OU=Manchester



I attempted to create a LDAP query as follows but i don't think the syntax is correct.

Select displayname FROM 'LDAP://Ourserver OU=Manchester' Where Objectclass = 'User'


Please could you direct me in getting the package to work.

Regards
dbman
dbman
Say Hey Kid
Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)

Group: General Forum Members
Points: 681 Visits: 1537
Any ideas anyone?
LutzM
LutzM
SSC-Insane
SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)

Group: General Forum Members
Points: 24193 Visits: 13559
It might be an issue between Unicode an Non-Unicode data format.
Did you try to change the data type in your target table to NVARCHAR(50)?
(Just a pot shot though...)



Lutz
A pessimist is an optimist with experience.

How to get fast answers to your question
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
dbman
dbman
Say Hey Kid
Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)Say Hey Kid (681 reputation)

Group: General Forum Members
Points: 681 Visits: 1537
Thanks for the reply. I have changed my datatype to Nvarchar (50) I am still getting the warning sign on the ADO NET task: The data type system.object found on column "displayname" is not supported for ADO NET Source. This column will be converted to DT_NTEXT.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search