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

SSIS SQL 2012 OLEDB Source defaults all Date columns to DT_WSTR Expand / Collapse
Author
Message
Posted Wednesday, December 12, 2012 8:47 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, September 3, 2013 3:51 AM
Points: 263, Visits: 177
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
Post #1395714
Posted Thursday, December 13, 2012 3:36 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 9:00 AM
Points: 13,524, Visits: 11,313
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?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1396089
Posted Thursday, December 13, 2012 8:00 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, September 3, 2013 3:51 AM
Points: 263, Visits: 177
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
Post #1396205
Posted Thursday, December 13, 2012 1:20 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 9:00 AM
Points: 13,524, Visits: 11,313
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 :)




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

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1396370
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse