Migrating DB2 Data into SQL Server Using SSIS

By Tom Nonmacher

The process of migrating DB2 data into SQL Server can be an intimidating task, but with the right tools and guidance, it can be achieved successfully and efficiently. One of the most reliable tools for this is SQL Server Integration Services (SSIS). SSIS is a platform for data integration and workflow applications. It features a data warehousing tool used for data extraction, transformation, and loading (ETL). This article will cover the steps involved in this migration.

Before beginning the migration, it is essential to prepare both the DB2 and SQL Server environment. Ensure you have the necessary permissions on both systems. To connect to a DB2 Server, you may require a DB2 client on the machine where SSIS runs. For SQL Server, you will be using either SQL Server 2012 or SQL Server 2014.

The first step in the migration process is to create a new SSIS project in SQL Server Data Tools (SSDT). Once the project is created, add a new Data Flow Task and open it. The Data Flow basically defines the ETL, which will enable you to extract data from your source and load it into your destination.

Next, configure the DB2 source by dragging the 'ADO NET Source' from the toolbox to the 'Data Flow' task. In the 'ADO NET Source Editor', create a new ADO NET connection that points to your DB2 server.


-- Use the following code to test your DB2 connection
SELECT * FROM sysibm.systables
WHERE creator = 'YOUR_SCHEMA' AND type = 'T'

Once you've established the source connection, it's time to set up your destination, which in this case is SQL Server. Drag and drop the 'ADO NET Destination' to the 'Data Flow' task. Create a new connection that points to your SQL Server, either SQL Server 2012, 2014, or Azure SQL.


-- Use the following code to test your SQL Server connection
SELECT * FROM sys.tables

Once the destination is set, it's time to map the columns from your source (DB2) to your destination (SQL Server). This can be accomplished by opening the 'ADO NET Destination Editor', selecting 'Mappings' on the left panel, and then aligning the source columns to the destination columns.

Finally, it's time to execute the package. If everything is configured correctly, the data should be extracted from the DB2 source, and loaded into the SQL Server destination. The progress of the package can be monitored in the 'Progress' tab in SSDT.

In conclusion, SSIS is a powerful tool for migrating DB2 data into SQL Server. It provides a flexible, efficient, and user-friendly interface for handling complex ETL processes. With the right preparation and understanding of both DB2 and SQL Server systems, data migration can be a straightforward process.




D635F9
Please enter the code from the image above in the box below.