Below are steps that you can take to import data from IBMs DB2 database into SQL Server. I’m using SQL Server 2012 Express edition.
Figuring this out has been one of the more frustrating tasks for me, so I hope this helps others like me.
Step 1.) Download and install DB2 Data Server Runtime Client (9.7 Fix Pack 4). Found in IBMs download page.
Step 2.) Extract the contents of your download to Program Files / IBM
Extract and paste the folder and it’s contents under Program Files /IBM
Step 3.) Open your command prompt (as Administrator). Navigate to the “bin” folder under that folder you just copied into your directory.
Type db2oreg1 -i then type db2oreg1 -setup
Registering and setting up your DB2 ODBC Driver in Windows
Step 4.) Open up SQL Server Management Studio. Right click on the database that you want to import DB2 data into
Right click on database name, select Tasks, select Data Import
Step 5.) Select the proper driver for DB2
Select the DB2 Driver that you need to connect to the database
Step 6.) Set the connection properties to your DB2 database
Set DB2 Connection properties and test connection
Step 7 .) Proceed with the wizard (Write a query to extract data or copy a table). I chose to write a query.
Step 8.) Preview mapping of query or table copy
Destination attribute types based on SQL evaluation of values from query
Step 9). Success!
If you experience any problems and would like some help, please be as specific as possible with regards to the steps you took to get where you are.