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
6.0.1
Release Date
Nov. 21, 2026
Size
35.6 MB
Platform
Windows 10 or later

Rather not run it yourself?

Let us do the migration →

DBConvert Studio adds an optional AI assistant that explains a run's errors, writes the SELECT of a table from SQL from your words, and tells what a plan does to your tables. It does nothing until you pick an agent, and it never sees your passwords.

See the assistant

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.

Scroll sideways to see all columns.

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.

Sync keeps an existing IBM DB2 database up to date with PostgreSQL: each run carries only the inserts, updates and deletes since the last one.

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.

2

Tables & mapping: see every IBM DB2 type before a row moves

Pick the tables, then open one: each PostgreSQL column shows the IBM DB2 type it becomes. Change a type or a name in place; the line at the bottom names anything that would fail.

3

Execution: start it, and the job is saved

Review what the run will do, start it, and read the log as it goes. The job stays in the list to run again or put on a schedule.

Validate the copy

With Validate after the run on, the destination is checked when the copy ends: schema, totals and rows. The window shows which tables, rows and columns differ.

How validation works

Every option, in the guide

Naming rules, table options, scheduling and the command line work the same for every database pair, so they live in one place.

Move PostgreSQL data into IBM DB2

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

Windows Windows 10 or later · 35.6 MB

Too large or too messy for a one-click move? Our engineers run the migration for you, from inventory to a tested cutover.

Migration services