DB2 Database Conversion Tool

The DB2 database conversion tool contained within RazorSQL allows users to convert DB2 tables to the following database types:

  • HSQLDB
  • H2
  • MySQL / MariaDB
  • MS Access
  • MS SQL Server / SQL Azure
  • Oracle
  • PostgreSQL / Redshift
  • SQLite

RazorSQL contains conversion tools to convert one or many tables at a time. When converting tables, the tool looks at the type of database the table is being converted to, and generates the database specific DDL to generate the table. It looks at the source database column types and does any adjustments necessary to convert those column types to the destination database's format. The tool then generates and executes the insert statements necessary to populate the table data on the destination database.

The following is an example of the DDL for an DB2 table:

CREATE TABLE "USER".EMP_PHOTO ( EMPNO CHARACTER(6) NOT NULL, PHOTO_FORMAT VARCHAR(10) NOT NULL, PICTURE BLOB(102400), PRIMARY KEY (EMPNO,PHOTO_FORMAT) ); )

When converting the above DB2 table from DB2 to MySQL, the conversion tool generates the following MySQL DDL corresponding to the above DB2 DDL:

CREATE TABLE EMP_PHOTO ( EMPNO char(6) NOT NULL, PHOTO_FORMAT varchar(10) NOT NULL, PICTURE longblob, PRIMARY KEY (EMPNO,PHOTO_FORMAT) );