When you run your changes from a change plan, you are issuing commands to change your DB2 database. A change plan presents a consolidated way to work with a set of changes that you would like to make to your database.
When you run the change plan, you can set the options for data preservation, undo commands, and DB2 maintenance commands in the Review and Deploy dialog. Alternatively, you can also set these options in the Properties view for the change plan.
All the changes that you make to a database are collected in a change plan. A database can have one or more change plans. Only one change plan can be active at a time, which means that the changes that you make are added to the active change plan.
When a change plan is active, the Object List includes an additional toolbar for the change plan. When no change plan is active and you initiate a database change, a change plan is automatically created with a default name of Default Change Plan timestamp, where timestamp has the form yyyy-mm-dd hh-mm-ss. The newly created change plan automatically becomes the active change plan. You can also manually create a change plan and provide your own name for the change plan. After the change plan is created, you must make it the active change plan.
A change plan remains active until you deploy the changes in the change plan, close the change plan manually to work with it at a later time, or make another change plan the active change plan.
Menu iItem | Description |
---|---|
Edit | Makes the change plan active. A change plan toolbar is displayed in the Object List, and the name of the change plan is in the change plan toolbar. Any changes that you make to the database are added to this change plan. You can also double-click the change plan to make it active. |
View | Shows the changes in the change plan. If a change plan is active, it remains the active change plan. |
Rename | Opens a dialog where you can rename the change plan. For change plans that are created automatically and given a default name with a timestamp value, you might want to change the name to make it more meaningful. |
Delete | Deletes the change plan. You are not prompted to confirm the deletion of the change plan. |
Review and Deploy | Generates the DDL to implement the changes in the change plan and displays the generated DDL in the Review and Deploy dialog. |
Review Undo Commands | Displays the generated DDL to back out the changes that were made to the database catalog when the change plan was successfully run against the database. To undo changes, the status of the change plan must be DEPLOYED. |
Properties | Brings the Properties view into focus where the change plan is displayed. You can use the properties tabs to alter the attributes of the change plan. |
Change plan status | Description |
---|---|
PENDING | The changes in the change plan have not been deployed to the database catalog. You can activate the change plan and make more changes, edit an existing change, or review and deploy the change plan. |
DEPLOYED | The changes in the change plan have been deployed to the database catalog. If undo commands were generated for the change plan and you decide that you want to back out the changes that you made to the database, you can run the undo commands. |
Icon | Description |
---|---|
![]() |
Shows the number of changes that are currently in the change plan. You can click the linked number to display the list of changes for the change plan. |
![]() |
For the list of objects that are currently displayed in the Object List, moves the focus to the next object that is being changed in the current change plan. Remember that you can always change which objects are listed in the Object List. |
![]() |
For the list of objects that are currently displayed in the Object List, moves the focus to the previous object that is being changed in the current change plan. |
![]() |
Generates the DDL to implement the changes in the change plan and displays the generated DDL in the Review and Deploy dialog. |
![]() |
Saves any newly defined changes to the change plan. |
![]() |
Closes the change plan. If any changes have not been saved, you are prompted to save or discard the changes when the change plan is closed. |
In the Object List, icons indicate
whether objects for the active change plan are being created (), altered (
), or dropped (
).