Search code examples
sqldb2database-migrationibm-data-studio

DB2 Linux to Windows Migration


We have a RHEL server running DB2 with one failing hard drive that is several years out of support. I've been tasked with migrating DB2 to a newer Windows server.

What is the easiest way to do this? Is it possible to take a backup of the entire database and restore it on Windows? In the past, the way I've duplicated databases from one DB2 server to another was to export each table from the schema one by one, create the new schema in the new database, then import each table one by one. We have several schemas that require migration, and it would be very time consuming to do it table by table. There must be a better and faster way of doing this.


Solution

  • You cannot restore on Windows a backup taken on a Linux server. Use db2look to extract the DDL statements, then db2move to export and load tables en masse (you can specify schemas or table name patterns).

    More info in the manual.