Skip to content
DBA Brain
Database migration

SQL Server or Oracle to PostgreSQL or MySQL

Moving a database to another engine is more than copying its tables: the types, the code inside the database, the queries the applications send and the way the switch is made all have to be worked out. We take a migration from the first inventory to the day after the switch, and look after the new database once it runs.

What it covers

Every part of the move, not only the data

Assessment

What is there: schemas and sizes, the objects and the code inside the database, the jobs, and the applications that connect to it. What moves across as it is, what needs rewriting, and what has no direct equivalent on the new engine.

Schema and data types

Types mapped one by one: identity columns and sequences, dates and time zones, numerics, text and collations. The differences that change results - Oracle's empty string that is NULL, case-insensitive comparisons on SQL Server - are each decided, not left to chance.

Code

Stored procedures, functions, triggers and packages written in T-SQL or PL/SQL, rewritten for PL/pgSQL or MySQL; the queries the applications send checked for syntax the new engine does not take.

Data

Moved in an order that keeps the keys and constraints right, large tables in parts. Where the downtime must be short, the bulk moves ahead of time and only the last changes wait for the switch.

Validation

Row counts and checksums per table, samples compared value by value, and the applications' own tests run against the new database before anyone depends on it.

A cutover with a way back

Rehearsed on a copy first. On the day: a planned window, a checklist, the checks above, and a way back to the old database if something is not right.

How it goes

Six steps, each agreed before the next

  1. Talkwhat you have, where you want to go, and by when
  2. Assessan inventory, and the list of what will need work
  3. Planthe order, the window, the checks and the way back
  4. Rehearsethe whole move on a copy
  5. Cut overin the window, with the checks
  6. Look aftertuning, backups and monitoring on the new engine
After the move

The new database watched from its first day

With DBA Brain, the open-source DBA tool this site makes: graded health metrics and alerts on PostgreSQL and MySQL - and on SQL Server and Oracle, so the old database and the new one are read the same way while both run - and, on PostgreSQL, backups proven by restoring them.

FAQ

Questions asked first

Do the applications have to change?

Usually a little: the connection string, the driver, and any query written in the old engine's own dialect. The assessment lists them, so the work is known before the move starts.

How long is the database down?

It depends on the size and on how much downtime the business can take, and it is decided in the plan. The usual aim is a short window: the bulk of the data moves before it, and the window holds the last changes, the checks and the switch.

Which moves are possible?

Mostly SQL Server or Oracle to PostgreSQL or MySQL. A move between versions of one engine, or to new servers, is DBA work too - see what we do, or ask.

Contact

Tell us about your databases

The engines and versions, the sizes, what the applications are, and where you want to go. We answer by email or by phone.