Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Importing data from Active Directory into SQL Server Table Expand / Collapse
Author
Message
Posted Friday, October 4, 2013 3:36 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, September 6, 2014 1:45 PM
Points: 112, Visits: 1,481
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


























Post #1501496
Posted Sunday, October 6, 2013 3:00 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, September 6, 2014 1:45 PM
Points: 112, Visits: 1,481
Any ideas anyone?
Post #1501963
Posted Sunday, October 6, 2013 3:23 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Sunday, September 7, 2014 11:27 PM
Points: 7,164, Visits: 13,257
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
Post #1501965
Posted Monday, October 7, 2013 4:56 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, September 6, 2014 1:45 PM
Points: 112, Visits: 1,481
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.
Post #1502077
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse