Deploying changes to a database

Deploying changes to a database is the process of changing the database catalog to reflect the conditions that you specified in the model specification phase. Deployment affects the database catalog, not the models.
To deploy changes to a database, complete the following steps:
  1. Create a deployment script. The New Deployment Script wizard guides you through the process of creating a deployment script. When you create a deployment script, the wizard prompts you to create a project and automatically creates a base and target model of the database.
  2. Make your changes to your target model. Models can be modified from the Data Models tab in the Deployment Script Editor.

    Optional: Compare your base and target models. Click Compare Base and Target Models to display the Comparison Editor. Use the Comparison Editor to verify that the proposed changes will produce the desired result.

  3. Generate your change commands from the Change Commands tab in the Deployment Script Editor.

    The Generate Change Commands wizard also helps you to generate data preservation and DB2 maintenance commands, which include import, export, authorization, rebind, runstats, and flush package cache commands.

    Start of changeOptional: You can use the Generate Change Commands wizard to create undo commands in case you need to undo your changes. You can also use the Deploy now option in the Generate Change Commands wizard to quickly deploy your changes. Check the Deploy now option on the Merge page to automatically start the Deployment wizard. Only use the Deploy now option if you are confident that all of your changes are correct and you are aware of the impact of those changes. End of change

  4. Use the deployment script to verify certain issues before deploying your changes. You should verify that:
    • The base model has not changed. If the base model has not changed, you can continue to deploy your changes to the database. If the base model has changed, you can choose to ignore the change and continue deploying your changes, or you can investigate the updated base model.
    • A connection to the database exists.
    • The change commands are correct.
  5. Deploy changes to the database catalog. DB2® Change Management Expert automatically manages the deployment of your changes and reports the results.
    In addition to using the deployment script, you can also deploy changes one at a time by using the projects in the Data Project Explorer view.
    1. Select a script file.
    2. Right-click the script file and click Run SQL from the context-sensitive menu. The script file extension should be .chx because the Run SQL option has certain restrictions when you use it with .sql and .ddl commands. For more information about the Run SQL restrictions see the Restrictions topic.
The changes that you have defined are deployed to the database catalog.
Related tasks
Working with XML source
Deploying changes to multiple databases


Feedback

Copyright IBM Corporation 2006, 2007. All Rights Reserved.