Cookies on this site

We would like to use cookies to understand how the site is used and to measure our campaigns. Nothing is set until you choose, and you can change your mind at any time from “Cookie settings” at the foot of every page. Privacy policy

Contact UsContact Us

Heterogeneous database migration between engines

Moving from Sybase, SQL Server, DB2 or MySQL to Oracle, or from Oracle to PostgreSQL, changes more than where the data lives. The schema, the stored procedures, the data types and the way applications talk to the database all have to be converted. We plan the move, automate as much of the conversion as we can, keep the old and new databases in step while you test, and validate the data table by table before you switch.

Assessment

Know what will convert, and what will not

Every engine has its own dialect. We inventory the tables, views, stored procedures, triggers, functions and jobs, run them through conversion tools to see how much converts cleanly, and estimate the code that needs rewriting by hand. We also look at what the tools cannot see: the queries built inside the applications, the reports, the batch jobs and the other systems that read from or write to the database. The result is a plan with the effort, the risks and a recommended order of work.

What we do

  • Inventory of schema objects, code and dependencies
  • Automated conversion report and an estimate of the manual work
  • Review of applications, reports and interfaces
  • A plan with the effort, the risks and the order of work

Conversion

Schema, code and data types converted and tested

We convert the schema and code with tools such as AWS DMS Schema Conversion and Oracle SQL Developer's migration support, then finish by hand the parts they cannot handle. The usual traps are known in advance: Oracle treats an empty string as NULL, PostgreSQL folds unquoted names to lower case where Oracle folds them to upper case, date and time types differ in range and precision, and T-SQL, PL/SQL and PL/pgSQL handle transactions and errors differently. Each converted procedure is tested against the original with the same inputs.

What we do

  • Schema conversion with automated tools, finished by hand
  • Stored procedures, triggers and functions rewritten and tested
  • Data type, NULL and case-sensitivity differences resolved
  • Application SQL changes listed for your developers

Data movement

Continuous replication until the switch

For a small database with a weekend to spare, a bulk load may be enough. For anything the business relies on all day, we load the new database and then replicate changes from the old one continuously, with Oracle GoldenGate or AWS DMS depending on the engines, so the two stay in step while you test. That is how an e-discovery company moved from Sybase to Oracle with zero downtime and no disruption to its clients' work.

What we do

  • A bulk load for small databases with a downtime window
  • Continuous replication with GoldenGate or AWS DMS
  • Lag and error monitoring throughout
  • A cut-over at a time you choose

Validation

Table-by-table proof before the switch

Data that has crossed engines has to be checked, not assumed. We compare row counts and checksums table by table, check the values where types were converted (dates, decimals and character sets), run your reports on both databases and compare the results. Performance is tested too, because a query that was fast on the old engine can need a new index or a rewrite on the new one.

What we do

  • Row counts and checksums for every table
  • Converted values checked: dates, decimals and characters
  • Reports run on both databases and compared
  • Performance tuning on the new engine

Common moves

The moves we plan and carry out

Heterogeneous migrations tend to follow a few patterns. Sybase and DB2 databases move to Oracle when the business wants to standardize on it. Oracle databases move to PostgreSQL when the business wants an open-source engine. Several engines are consolidated onto one to simplify support. Any of these can be combined with a move to a managed cloud service such as Amazon RDS, but doing both at once adds risk, so we often recommend two steps.

What we do

  • Sybase, SQL Server, DB2 and MySQL to Oracle
  • Oracle to PostgreSQL
  • Consolidation onto one engine
  • An engine change combined with a move to Amazon RDS

Case studies

Heterogeneous Database Migration in practice

Client names are withheld. We are happy to share details on a call.

All case studies
  • Delivered

    Zero downtime

    Legal technology

    Oracle

    Sybase to Oracle with zero downtime for an e-discovery company

    Sybase was holding back a platform that processes large volumes of legal data. We converted the schema, kept both databases in sync with continuous replication, validated the data and switched over without interrupting the business.

    • Zero downtime at cut-over
    • No disruption to client workflows

Questions

Common questions

How much of the conversion is automatic?

It depends on the code. Tables, indexes and simple views usually convert cleanly; stored procedures, triggers and engine-specific features need more work. The assessment runs your own schema through the conversion tools, so the estimate is based on your code rather than on a rule of thumb.

Do our applications need to change?

Usually some do. Connection strings and drivers change, and SQL written inside the application may use features of the old engine. We list each change for your developers, help them make it, and test the applications against the new database before the switch.

Can we run the old and new databases side by side?

Yes, and for anything important we recommend it. Continuous replication keeps the new database current while you test it with real data, and the switch happens only when the results are right.

How do you prove the data is the same?

We compare row counts and checksums table by table, check the values where data types were converted, and run your own reports on both databases. You get the results in writing before you decide to switch.

Should we change engines and move to the cloud at the same time?

It can be done, but each change is a source of risk, so we often recommend two steps: change the engine first, or move the database as it is first, depending on which brings the business more benefit sooner. The assessment sets out both options.

From the blog

Writing on Heterogeneous Database Migration

All Oracle & databases articles

Related services

On-site IT support across New Jersey, New York City and Philadelphia. Remote services wherever you are. Areas we serve →

Changing database engines? Get a migration plan first.

We run your schema through the conversion tools and come back with the effort, the risks and a cut-over approach, before you commit to anything.

Tell us what you are working on

A few lines is enough. The engineers who do this work will reply within one business day.

Or email it.services@princetonits.com or call +1 (212) 507-9350.