IBM DB2 to SQL Server Migration

c# database-migration db2 sqlbulkcopy sql-server

Question

I am new to IBM DB2. Got a job to migrate data from DB2 to SQL Server. Able to connect DB2 database with IBM DB2 client via command prompt. We have already migrated Oracle data to SQL server with ASP.NET SQL Bulk Copy in C#. Need to migrate DB2 data on regular basis based on daily updates. Need details on how to run DB2 sql queries in any editor just like SQL plus for Oracle or Management Studio for SQL Server. Also need information on how to sync DB2 data with Bulk Copy in C#. Thank you in advance for the answers!

Popular Answer

2 ways I currently do this are by using an ODBC connection to the db2 db and then:

1) set up a linked server so that queries can be directly run against db2. The downside is that moving large tables is pretty slow.

2) use SSIS to move the data. These can be created directly from SQL server for simple imports and for anything requiring more complicated coding such as cleaning up the data along the way (I have to remove lots of white space char fields), I use Visual Studio to create the SSIS packages.

Both methods can be set up as jobs and run automaticaly.



Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow