Deploying a change plan to the database

Generate the commands to implement the changes for a change plan. The commands are generated from the change plan. Then, run the generated commands to apply the changes to the database.

Before you begin

A connection to the database must exist.

Procedure

  1. Complete either of the following actions to generate the commands for your change plan.
    • If the change plan is active and is displayed in the change plan toolbar in the Object List, click the Image for the Review and deploy changes icon (Review and deploy changes) icon on the toolbar.
    • Otherwise, in the Administration Explorer, click the Change Plans folder for the database. In the Object List, right-click the change plan that you want to deploy and click Review and Deploy.
    The Review and Deploy dialog opens and displays the generated change commands.
  2. Review the commands. If you are not satisfied with the commands, you can click Cancel, modify the change plan, and regenerate the commands.
  3. Optional: Alter the commands that are displayed by using the various elements in dialog.
    Tip: View the context-sensitive help for information about the elements in the dialog.
  4. Select a deployment option and then click Finish.
    Tip: You can modify and then run generated commands in the SQL and XQuery editor. When you open the generated commands in the SQL and XQuery editor, the change plan is closed. You can also create a job and schedule when to run the generated commands in the Job Manager.
    Remember: Change plans are not updated when you use the SQL and XQuery editor or Job Manager to modify or run the generated commands and the status of the change plan remains as PENDING in the Change Plans folder.
  5. Check the results of running the commands in the SQL Results view.
    If any commands that were run failed, determine the cause of the failure and take corrective action. For example, you might use one of the following approaches:
    • Analyze the deployed command script to determine if you can continue to run the script from the point of failure after you make the necessary adjustments to the script or DB2® system.
    • Use the undo script to help you roll back the partially deployed changes.

    With either approach, click the Change Plans folder for the database in the Administration Explorer. To work with the deployed command script, right-click the change plan and click Review and Deploy. To work with the undo script, right-click the change plan and click Review Undo Script. The commands open in the Review and Deploy dialog.

    Remember: If you modified the commands that were generated for the change plan, you must also modify the generated undo commands in the SQL and XQuery editor before you deploy those undo commands to the database.

Results

Your database now reflects the changes that you specified.

Feedback