SQLines Data Tool - Database Migration from IBM DB2 to SQL Server

SQLines Data is a scalable, high performance data transfer, schema conversion and validation tool for IBM DB2 to Microsoft SQL Server and SQL Azure migration.

  • IBM DB2 for LUW and z/OS 11.x, 10.x, 9.x, 8.x and 7.x
  • Microsoft SQL Server 2016, 2014 and 2012

Why SQLines Data

SQLines Data benefits:

Migration Features

  • All Data Types
  • NOT NULL Constraints
  • DEFAULT Clauses
  • CHECK Constraints
  • Primary and Foreign Keys
  • Unique Constraints
  • Indexes
  • Comments on Tables and Columns
  • Schema Name Mapping
  • Validation by Row Count

You can use SQLines SQL Converter tool to convert stored procedures, functions, triggers, views and other objects.

Scalability and High-Performance

  • Transferring tables in multiple concurrent sessions
  • Performing concurrent read and write operations in each session
  • In-memory processing with shared buffers
  • Using DB2 CLI driver with array processing to extract data from IBM DB2
  • Using SQL Server Native Client Bulk Copy API to insert data to SQL Server
  • C/C++ application, 32-bit and 64-bit
  • Microsoft Windows version

Designed for DBAs and Enterprise-Class Migrations

  • Easy to set up and configure the transfer of a large number of tables
  • Command line with powerful and easy to use options
  • Wildcards to select tables
  • Comprehensive performance stats to help you tune the data transfer
  • No space required to hold DB2 export
  • No .NET data access providers required
  • No JDBC
  • No installation required

SQLines Data in Command Line

You can use SQLines Data tool in command line. Just launch sqldata.exe on Windows with the specified options.

For information how to define DB2 and SQL Server connections, see SQLines Data Connection String Formats.


  • Transfer a single table
sqldata -t=emp -sd=db2,db2user/db2user_pwd@sample_db -td=sql, sql_user/sql_pwd@server_host\instance,sql_db

-t option defines the table name, -sd and -td options (source and target databases) specify the connection strings for DB2 and SQL Server, respectively.

This command transfers table emp from DB2 sample_db database to SQL Server sql_db database located on server_host\instance.

  • Load into the default schema
sqldata -t=emp -sd=db2,db2user/db2user_pwd@sample_db -td=sql, sql_user/sql_pwd@server_host\instance,sql_db

The option -smap=*: specifies that the DB2 schema name is removed from all executed DDL statements in SQL Server, so all objects will be created in the default schema for the user (typically it is dbo).

For list of options, see Command Line Reference.

Troubleshooting SQLines Data

There are two main sources that can help you troubleshoot SQLines Data:

  • sqldata.log file

sqldata.log file contains the detailed information about DB2 to SQL Server migration process.

By default, sqldata.log file is located in the current working directory. You can use -log command line option to change its location and file name.

  • sqldata_ddl.sql file

sqldata_ddl.sql file contains information about all DDL statements executed in SQL Server during migration.

In this file you can see the full SQL statements, the execution result (success or failure) and the execution time. In case of an error, you can find the error message returned by SQL Server.

By default, sqldata_ddl.sql file is located in the current working directory. You can use -out command line option to change its location.

  • sqldata_failed.sql file

If there are any failed SQL statements, you can find them in sqldata_failed.sql file.