Wednesday, March 7, 2012

Importing data from DB2 to SQL server

Hi,

I'm new to SQL server. My huge data is there in DB2. I tried to import using SSIS import/export wizard, it does successfully with default datatype columns.

for example, If my DB table has numeric columns, it has been imported as "double" and if it is string, it has been impoerted as "nvarchar". Is there any way to have correct/equivalnet datatype import from DB2?

Rgs

Vasu

You could save the package generated by the export/import wizard and then modify it as you need. Take a look at the data convertion transformation in the data flow. Here are some SSIS data types guidelines:

http://msdn2.microsoft.com/en-us/library/ms141036.aspx

|||I don't understand. The data types seem correct to me. What's the problem exactly?

DB2 data types are not necessarily the same as SQL Server.|||

This page has tables of data type mappings between DB2 and SQL Server:

http://www.redbooks.ibm.com/redbooks/SG246672/wwhelp/wwhimpl/common/html/wwhelp.htm?context=SG246672&file=23-2.htm

You can download the larger documentation from which this is taken (in PDF format) here:

http://www.redbooks.ibm.com/redbooks/pdfs/sg246672.pdf

No comments:

Post a Comment