Built and supported by InterkeyAn Interkey product, delivered and supported by Interkey
One platform for migration and continuous syncThe move and the replication that follows it
Written quote after one meetingThe price is discussed in a meeting about your systems
A Db2 migration moves data and applications from IBM Db2 to another database, such as PostgreSQL or SQL Server, or copies Db2 data continuously into a newer system. The safe pattern is to load the data, keep Db2 and the target in sync, and switch application by application. Interkey delivers this in Saudi Arabia with iblync.
At a glance
The main facts of a Db2 migration with Interkey
Question
Short answer
What a Db2 migration is
Moving data and applications from IBM Db2 to another database, or copying Db2 data continuously into a newer system
Where the data can go
PostgreSQL, SQL Server or MySQL, or another system iblync connects to
Db2 platforms
iblync connects to Db2 on LUW, z/OS and IBM i
How the data moves
An initial load, then continuous sync with iblync while Db2 stays in production
Who does the work
Interkey: assessment, code rework, data move and cutover, with your database and application teams
Three routes off Db2
Most Db2 projects follow one of three routes. Each one fits a different situation.
01
Full migration to another engine
The data, the schema and the stored code move to PostgreSQL, SQL Server or MySQL, and Db2 is retired once the applications have moved. It fits when the reason to leave is clear and the applications can be changed and tested.
02
Continuous copy, with Db2 staying
iblync keeps a newer system supplied with Db2 data, in one direction, while Db2 stays the system of record. It fits when reporting or a new application needs current Db2 data and the core programs stay where they are. See real-time replication.
03
Stay on Db2 and modernise around it
Db2 stays. The applications and services around it are modernised first, and the database decision is taken later. It fits when Db2 does its job and nobody plans to rewrite the programs that depend on it.
Db2 to PostgreSQL or SQL Server: what needs rework
Six differences that come up on most Db2 sources.
Db2 features, their PostgreSQL and SQL Server counterparts and the work each one needs
In Db2
In PostgreSQL and SQL Server
What the work is
TIMESTAMP with up to 12 fractional digits, and DECFLOAT
PostgreSQL timestamp keeps 6 fractional digits and SQL Server datetime2 keeps 7; neither has DECFLOAT
Each column is mapped by the values it holds. Longer timestamps are rounded, so code that compares them is checked. DECFLOAT usually becomes numeric or decimal.
Columns declared FOR BIT DATA, and text often stored in EBCDIC on z/OS and IBM i
bytea in PostgreSQL, varbinary in SQL Server; text in UTF-8 or Unicode
Binary columns move as binary, not as text. Text is converted to the target encoding during the load, and column lengths are checked, because a character can take more bytes after conversion.
Identity columns, and sequences called with NEXT VALUE FOR
Identity columns in both; PostgreSQL calls a sequence with nextval('seq'), SQL Server keeps NEXT VALUE FOR
Calls are rewritten where the target needs it, then each sequence and identity column is set past the highest value loaded.
Stored procedures and functions in SQL PL
PL/pgSQL in PostgreSQL, Transact-SQL in SQL Server
The code is rewritten in the target language and tested against production-shaped data. Error handling and cursors usually need the most care.
Row-level triggers with their code written inside them
PostgreSQL: a trigger that calls a separate trigger function. SQL Server: statement-level triggers that read the inserted and deleted tables
Each trigger is rewritten for the target, and row-by-row logic is reviewed where it moves to a statement-level trigger.
SYSIBM.SYSDUMMY1, special registers such as CURRENT TIMESTAMP, and FETCH FIRST n ROWS ONLY
A SELECT with no FROM and CURRENT_TIMESTAMP in both; PostgreSQL accepts FETCH FIRST, SQL Server uses TOP or OFFSET with FETCH NEXT
The SQL in the applications and in the stored code is searched for these forms and rewritten.
Each row follows IBM's Db2 documentation and the PostgreSQL and SQL Server documentation. Details differ between Db2 on LUW, z/OS and IBM i, so the assessment checks every row against the release you run.
Db2 on LUW, z/OS and IBM i
IBM Db2 runs on three platforms, and iblync connects to Db2 on all three: Linux, UNIX and Windows (LUW), z/OS on the mainframe, and IBM i. The platform changes the work around the data more than the route.
Db2 on LUW runs on the same kinds of servers as the usual targets, so the move is mostly about schema, code and data.
Db2 on z/OS and on IBM i often hold text in EBCDIC, and their applications are often COBOL or RPG programs with SQL inside them. Those programs join the scope when the applications move.
The platform and release you run are confirmed in the assessment, together with the target. The full list of sources and targets is on the iblync connectors page.
Db2 keeps serving production through every step until the last application has moved. The two ways of reading changes from a source database are compared in log-based or query-based CDC, and the parallel run is on parallel run and cutover.
Initial load.
The existing data is copied to the target once, at a limited speed so production on Db2 is not slowed.
Continuous sync with iblync.
iblync applies every change made in Db2 after the load to the target. If the target is unavailable, changes wait in a queue and are applied when it returns.
Comparison.
The data in both databases is compared against checks agreed in advance, and each application is tested on the target.
Switch, application by application.
Each application's connections move to the target in a short pause whose length is agreed in advance. Where a moved application writes data that others still read in Db2, two-way sync keeps both sides in step.
When to stay on Db2
Sometimes the honest answer is to stay. Three cases come up most:
Packaged software that its vendor supports only on Db2. Moving the database would leave you on an unsupported system.
Core programs on z/OS or IBM i that nobody plans to rewrite. The database can move only when the programs that use it move.
No real problem today. If Db2 carries the load and the support suits you, a migration adds risk without a reason.
In these cases the second route, copying Db2 data to a newer system, may give the business what it needs. The assessment says so in writing.
What shapes the work and the timeline
We do not publish a fixed duration for a Db2 migration, because your environment decides it. Four factors shape the work and the timeline:
Stored code and application SQL: procedures, triggers, and SQL written for Db2 inside the applications. Usually the largest factor.
The platform: LUW, z/OS or IBM i, and with it the encoding and the programs around the database.
The data: its volume and how fast it changes.
The switch: how many applications move, and the downtime window accepted for each.
Read more
The assessment turns these into a schedule for your project. The price is discussed in a meeting; see iblync pricing to book one. Before you start, the migration checklist helps you gather the details, and each target has its own page: PostgreSQL migration and SQL Server migration.
Yes, as a project in two parts. The schema and the stored code are rewritten for PostgreSQL, with SQL PL becoming PL/pgSQL. The data is loaded and then kept in sync by iblync until the switch, so Db2 stays in production meanwhile. The wider route is on our PostgreSQL migration page.
02Can Db2 be migrated to SQL Server?
Yes, in the same two parts. SQL PL is rewritten in Transact-SQL, row-level triggers are reworked for SQL Server's statement-level triggers, and some types are mapped again. The data moves with an initial load and continuous sync, and applications switch one at a time. See our SQL Server migration page.
Yes. IBM Db2 is one of the systems iblync connects to, as a source or a target, on LUW, z/OS and IBM i. The platform and release you run, and the target you choose, are confirmed in the assessment. The full list of sources and targets is on the iblync connectors page.
Yes, through the initial load and the continuous sync. A short pause remains when each application's connections switch to the target, and its length is agreed with you in advance. Because applications can move one at a time, Db2 keeps serving the ones that have not moved yet.
05Can we copy Db2 data to a new system without retiring Db2?
Yes. iblync keeps the new system supplied with Db2 data through continuous one-way sync, while Db2 stays the system of record for the programs that use it. This suits reporting and new applications that need current data. Our real-time replication page explains how it runs.
Tell us the Db2 platform (LUW, z/OS or IBM i), roughly how many stored procedures and triggers it holds, the data volume, the target, and the downtime window you can accept.
What happens next
We read your request
An engineer contacts you
You get an estimate or a demo
Built and supported by Interkey
An Interkey product, delivered and supported by Interkey
One platform for migration and continuous sync
The move and the replication that follows it
Written quote after one meeting
The price is discussed in a meeting about your systems