Migration analysis

A common task that you might have as a DBA is to migrate the changes from one database environment to another. For example, you might be asked to promote the changes that were made to a large development database (the source database) to the formal test database (the target database). Migration analysis is the process of comparing two databases and identifying the differences between them.

Without DB2® Change Management Expert, you would need to keep track of the differences yourself by using mechanisms such as catalog queries to find the differences or by using tools to reverse engineer the catalogs into SQL and to identify the differences between the SQL. After finding the differences, you would then need to create and run the DDL to apply the appropriate changes to the test database.

With DB2 Change Management Expert, you can create models of the development database and the test database and compare the models to determine which objects are different. The Comparison Editor makes it easy to visualize the differences between models. You can also use the Comparison Editor to synchronize the structure of the test database model to the development database model (the source model) by moving the differences. After the test database model has the appropriate changes, you can then create a deployment script, using the test database model as the target model, to apply the changes to the actual test database.

Typically, a database is not exactly the same between environments. For example, in the previous scenario, the development database name might be different from the test database name. The development database might also have only one table space, no indexes, and relatively little data, whereas the test database might have several table spaces, a few indexes, and more data. So, as you analyze the differences, you need to identify those differences that are of real interest.

Comparing and synchronizing models of the source and target databases is one way to migrate changes between database environments. Another way to migrate changes is to apply the deployment script that was used to change the source database to a target model of the target database. DB2 Change Management Expert extracts the DDL changes from the deployment script and applies them to the target model. You can then regenerate change commands, handle data preservation, rebind changes, and deploy the changes to the actual database.

Comparing models, analyzing all the differences, and synchronizing the target model with the relevant differences can be time-consuming and labor intensive. Therefore, applying a deployment script to a target model to migrate changes can be an easier approach. The deployment script contains only the DDL for what changed in the source database; any other differences are ignored.

Related concepts
Models
Working with the deployment script
Model comparison and synchronization
Related tasks
Applying another deployment script to a target model
Related information
Merging the structural differences of data objects in the compare editor
Merging data object properties differences in the compare editor


Feedback

Copyright IBM Corporation 2006, 2007. All Rights Reserved.