DB2® Change Management Expert provides
the ability to deploy changes to multiple databases simultaneously. This functionality
is called multiple provisioning. Deploying changes to multiple
databases in a single operation can save time and increase productivity.
Prerequisite: You must have connections to all of the databases
to which you want to deploy your changes in the Database Explorer.
Important: Before you deploy changes to multiple databases,
validate those changes thoroughly on a test system.
The following figure
illustrates the process of deploying changes to multiple databases from the
deployment script.
Figure 1. Deploying changes to multiple
databases
Restriction: Undo scripts are not generated when you deploy
to multiple databases.
To deploy your changes to multiple databases,
complete the following steps:
- Open the deployment script that you want to work with. Select to display the Multiple Deployment tab
on the Deployment Script Editor.
- On the Multiple Deployment page, click Add to
open the Add Connections window. From the list of connections, select the
connection that you want to add. For example, select SAMPLE from
the list of active database connections that is displayed.
You
can add connections to any of the databases that are listed in the Add Connections
window. However, the maximum number of connections that DB2 permits is eight.
The eight database limit is the default for the number of concurrently active
databases on a single DB2 instance. If the connections are to different DB2
servers or different instances on the same server, or if the you have changed
the NUMDB parameter, this limit might be higher.
You can use
a wizard to generate the data-preservation and maintenance commands that can
be deployed against the selected database connection. To access the wizard,
select a connection, right-click and then select Generate commands. 
In
addition, if you select a non-active connection, a dialog will display during
deployment and prompt you for your user ID and password to connect to that
database.
Repeat this step for each additional database that you want
to add.
- Click Deploy Change Commands to All Connections to
deploy your changes to all of the database connections in your Connections
List at one time. DB2 Change Management Expert deploys
your change commands to the databases in the list.
Tip: The
status bar in the lower right corner displays your deployment progress.
Optional: If
you have many database connections in the Connections List, you can select
one of them at a time and click Deploy to deploy your
changes to the selected database only.
- On the Multiple Deployment page, click Open the Deployment
Log File to review the deployment log file. This log file contains
the results of your change commands on the selected databases.
A deployment log file is shown in the following example:
!SESSION Sep 06, 2005 17:16:08.288 ---------------------------------------------
eclipse.buildId=M200503110845
java.fullversion=J2RE 1.4.2 IBM Windows 32 build cn142-20040926 (JIT enabled: jitc)
!ENTRY Sep 06, 2005 17:16:08.288
!MESSAGE Executing " ALTER TABLE CME.PROJECT ADD COLUMN "test" VARCHAR (32) " for
Database: SAMPLE
SUCCESSFUL!!!
Your changes have now been deployed to all of the databases that
you specified.