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


SSIS SQL 2012 OLEDB Source defaults all Date columns to DT_WSTR


SSIS SQL 2012 OLEDB Source defaults all Date columns to DT_WSTR

Author
Message
Daniel Forrester 123
Daniel Forrester 123
Mr or Mrs. 500
Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)

Group: General Forum Members
Points: 572 Visits: 195
Hi,

I have a data flow task that moves date from one SQL 2012 Database to another SQL 2012 database using an OLEDB source. I have a problem that all columns of type Date are being mapped to the DT_WSTR datatype in SSIS.

I have found the following which is quite interesting. I have checked the default mapping in the MSSQLToSSIS10.xml file and the Date datatype is mapped to DT_DBDATE as I would expect.

http://www.simple-talk.com/sql/ssis/working-with-ssis-data-types/

Has anybody else encountered this or have any ideas?

Regards
Daniel
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)

Group: General Forum Members
Points: 60197 Visits: 13297
What if you change the datatype of the output column in the advanced editor? Does that work?


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Daniel Forrester 123
Daniel Forrester 123
Mr or Mrs. 500
Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)

Group: General Forum Members
Points: 572 Visits: 195
Hi,

Using the advanced editor does work but I have quite few packages with this problem.

I'm pretty sure the problem is related to the MSSQLToSSIS10.XML mapping file but nothing I seem to do affects the way SSIS maps the columns. I think I am missing something here.

However I have found that changing the OLEDB provider for my source connections from 'Microsoft OLE DB Provider for SQL Server' to 'SQL Server Native Client 11.0' fixes the problems as SSIS maps the columns to the right data types.

The problem is not fixed but the work arround isn't too bad.

Thanks
Daniel
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)

Group: General Forum Members
Points: 60197 Visits: 13297
Daniel Forrester 123 (12/13/2012)
Hi,

Using the advanced editor does work but I have quite few packages with this problem.

I'm pretty sure the problem is related to the MSSQLToSSIS10.XML mapping file but nothing I seem to do affects the way SSIS maps the columns. I think I am missing something here.

However I have found that changing the OLEDB provider for my source connections from 'Microsoft OLE DB Provider for SQL Server' to 'SQL Server Native Client 11.0' fixes the problems as SSIS maps the columns to the right data types.

The problem is not fixed but the work arround isn't too bad.

Thanks
Daniel


Ah yes, it is recommended to use the native client instead of the MS OLE DB provider for SQL Server. This is one of those reasons Smile


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
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