PostgreSQL
IBM DB2

PostgreSQL to IBM DB2 Converter

Tables, keys and rows into DB2, once or as a sync, with saved jobs you can run again.

Version
5.6.0
Release Date
Nov. 3, 2026
Size
45.6 MB
Platform
Windows 10 or later

Rather not run it yourself?

Let us do the migration →

Move a PostgreSQL database into IBM DB2 without writing the DB2 schema by hand. DBConvert creates the tables, keys and indexes, picks a DB2 type for every column, and copies the rows server to server.

  • Reads PostgreSQL, Amazon RDS or Aurora, Azure Database for PostgreSQL, Google Cloud SQL, or Supabase.
  • Writes to DB2 for Linux, UNIX and Windows 11.1 and later.
  • Reaches a DB2 server through the built-in SSH tunnel.
  • Runs on Windows as a desktop application.
  • The same download converts DB2 back into PostgreSQL.

Convert once, or keep DB2 in step

Conversion

Creates the DB2 tables and loads the rows. Rows go in large batches. A row DB2 refuses is named in the log with the server's reason, and the rest of its batch still arrives.

Synchronization into DB2

Carries inserts, updates and deletes from PostgreSQL into DB2 each time the job runs. It works in one direction: DB2 is never the source of a sync. How sync works

How PostgreSQL types map to DB2

These are the defaults. Change any column's type on the Tables step before a row moves.

In PostgreSQL In DB2
numeric DECIMAL up to 31 digits. A numeric without a precision, or a wider one, becomes DECFLOAT(34); a value with more than 34 digits is refused and named, never rounded.
timestamptz, time TIMESTAMP holding the UTC instant. DB2 TIME keeps whole seconds, so a time with a fraction is refused and named.
interval, timetz Their text in a VARCHAR. DB2 has no interval type.
Arrays, json, jsonb, xml CLOB with the exact text.
uuid, bytea, money, boolean CHAR(36), BLOB, DECIMAL(19,2) and BOOLEAN.
serial, keys Primary, unique and foreign keys and indexes are created. A serial column keeps its values and continues after them.

What stays behind

DBConvert moves tables, columns, keys, indexes, foreign keys, defaults and rows. Views, procedures, functions and triggers are not converted: rewrite them by hand for the new database.

DB2 means DB2 for Linux, UNIX and Windows 11.1 or later. DB2 for z/OS and IBM i (AS/400) are not supported.

Supported versions and services

PostgreSQL

  • PostgreSQL 8.x through 17.x
  • Amazon RDS / Aurora for PostgreSQL, Azure Database for PostgreSQL, Google Cloud SQL, Supabase
  • PostgreSQL schemas (public, custom schemas)

IBM DB2

  • IBM DB2 for Linux, UNIX and Windows 11.1 and later
  • Setup downloads the IBM Data Server Driver for ODBC and CLI from IBM. Installing offline

How to migrate PostgreSQL to IBM DB2

1

Setup: connect PostgreSQL and IBM DB2

Pick Convert or Sync, then choose the source and destination connections side by side on one screen. A connection is saved once and reused by every job.

The Setup step in DBConvert: the mode, the PostgreSQL source and IBM DB2 destination side by side, and the job name

PostgreSQL source

Follow the PostgreSQL connection guide for your own server, Amazon RDS / Aurora, Azure, Google Cloud SQL, or Supabase.

DB2 target

Enter the host, port (50000 by default), database name, user and password. Leave the schema empty to write into the login's own. See Connect IBM DB2.

Move PostgreSQL data into IBM DB2

Download the current build and run the first job against your own database.

Windows Windows 10 or later · 45.6 MB