Using Db2 Migration Service - IBM Documentation
Using Db2 Migration Service - IBM Documentation
To use the Db2 Migration Service, users can either use the command line client or access it through a website.
Attention: The IBM® Db2 Migration Service is offered at this time as a technical preview. It is intended for use in non-production environments.
To use the Db2 Migration Service, you must first start the Migration Server, and then use Migration Client to send a migration job request. Running the M
Alternatively after the installation and if the default port number values were used, the Db2 Migration Service website is accessible under https://<m
the Db2 Migration Service is running.
Procedure
Run a migration job from the command line.
To run a migration job, use the migration_client script and provide the migration scenario, and the source and target environments details.
Example
Example 1: Migrating two tables, TABLE1 and TABLE2, from one Db2 database to another Db2 database:
MIGRATION_CLIENT DB2_DB2 --THOSTS 10.0.0.1 --TUSER ADMIN2 --TPASS PASSWORD2 --TDB TDATABASE --SHOST 10.0.0.2 --SUSER ADMIN1 --SPASS PASSWORD1
Example 2: Migrating two tables, TABLE1 and TABLE2, from one Db2 database to another Db2 database. The tables are renamed to TABLE1A and TA
MIGRATION_CLIENT DB2_DB2 --THOSTS 10.0.0.1 --TUSER ADMIN2 --TPASS PASSWORD2 --TDB TDATABASE --SHOST 10.0.0.2 --SUSER ADMIN1 --SPASS PASSWORD1
Example 3: Migrating a whole schema. This scenario can be done by using the following command:
migration_client db2_db2 --shosts 10.0.0.1 --suser ADMIN1 --spass PASSWORD1 --sschema SOURCE_SCHEMA --sdb SDATABASE --thosts 10.0.0.2 --tuser
Example 4: Migrating to Db2 on Cloud. The following command can migrate the database and the schema to a cloud offering, in this case to Db2 on C
migration_client db2_db2cloud --shosts 10.0.0.1 --sport 50000 --suser ADMIN1 --spass PASSWORD1 --thost db2oncloud.ibm.com --tport 12345 --tus
Example 5: Migrating from one cloud offering to another cloud offering. This scenario can be done by using the following command:
migration_client db2_db2 --shost DB2ONCLOUD1.IBM.COM --sschema SSCHEMA --suser ADMIN1 --spass PASSWORD1 --sdb SDATABASE --sport 50001 --thos
Note: Using the db2_db2 option to migrate cloud instances, you need to enable SSL connections for both directions. This means specifying the
– --target-ssl True
– --source-ssl True
– Specifying an SSL port
If you are using the db2_db2cloud option, --target-ssl True is set by default.
https://www.ibm.com/docs/en/db2/11.5?topic=service-using-db2-migration 1/2
2/17/24, 8:10 PM Using Db2 Migration Service - IBM Documentation
Example text file:
# Migration arguments
Note: Using more than one file to acquire arguments from, arguments from all of these files are concatenated.
Parent topic:
IBM Db2 Migration Service
https://www.ibm.com/docs/en/db2/11.5?topic=service-using-db2-migration 2/2