Migrating data
Use the automatic data migration feature to perform a complete system migration from a source to a target Db2® instance, including unloading, transferring, and loading of the data on the target hosts.
Prior to version 4.1, you could use Optim™ High Performance Unload to repartition data while unloading it by using repartitioning rules that were specified in the TARGET KEYS or the TARGET TABLE clause. In this method, repartitioned data is unloaded in separate files, one per target database partition. However, the corresponding output files cannot be generated on the hosts where the related target database partitions are located. Therefore, in a migration scenario, after you unload and repartition the data, you still need to transfer the output files on the corresponding machine and load them on the target instance. By using the automatic data migration feature, you can complete all of the steps that are required to migrate data in a single operation.

Automatic data migration syntax keywords
- Use the MIGRATE keyword instead of the UNLOAD keyword at the beginning of an UNLOAD block.
- You can specify the migration of a whole database, a whole table space, or of a list of tables that are specified in the SELECT blocks related to the MIGRATE block.
- Use the TARGET ENVIRONMENT and the WORKING IN clauses to define the target system specifications and the location for temporary files.
- You can use the UMASK clause to override the system permissions on the target system. The umask option is also available for the command line and in the configuration file db2hpu.cfg.
Output format specification during data migration
- MIGRATION
- The special keyword for migration format. At this time, the MIGRATION format works the same way as the DEL format.
- DEL
- The default migration format.
- DELIMITED
- Do not use the DELIMITED format for data migration unless you have a row delimiter (end of line character) among character string data that you want to migrate automatically. In this case, you can load the corresponding delimited file only if the DELPRIORITYCHAR modifier is specified in the corresponding load command. The only way to generate the appropriate load command is by using the DELIMITED format and the corresponding DELPRIORITYCHAR modifier. Since the DELIMITED format offers much more capabilities with the modifiers, it should be avoided as much as possible for system migration purposes.
- IXF
- Use it to ensure that floating point values are migrated without a loss of precision towards a mono-partitioned database.
- ASC
- Use it to ensure that floating point values are migrated without a loss of precision towards a DPF database.