Your changes might require that some tables be dropped, created,
or dropped and recreated, such as when you drop a column from the middle of
a table. You might need data unload commands to preserve data from the dropped
table and data load commands to load the appropriate data into the newly created
table when you make database changes, including undoing a change. You can
generate data unload and load commands and map the tables from which to unload
and then load the data from the Deployment Script Editor.
To generate data unload and load commands from the Deployment Script
Editor, complete the following steps:
- On the Change Commands tab of the Deployment Script Editor, click Generate
Change Commands. The Generate Change Commands wizard
starts.
- Ensure that the Enable data preservation option
on the first page of the wizard is checked, and complete the steps in the
wizard for generating data unload and load commands.
If data
preservation is unchecked DB2® Change Management Expert will
not attempt to generate data preservation commands even if they are needed.
If data preservation is not needed DB2 Change Management Expert will
not generate any data preservation commands.
DB2 Change Management Expert generates
default data preservation entries when it detects that data needs to be preserved.
You can also add your own entries to associate data unload commands with their
corresponding load commands. When the Customize field
for an entry is set to Yes, the wizard includes pages
that allow you to customize the data unload and load commands and map how
data should be unloaded out of one table and loaded into another table. You
can toggle the Customize field. DB2 Change Management Expert automatically
sets the Customize field to Yes if
it detects that you might need to customize the commands or map the columns.
Important: Ensure that the data file names for your data unload and
load commands are correct. Incorrect data file names can result in data loss.
All data unload commands must specify unique data file names.
Also, on the first page of the Deployment wizard,
ensure that the Stop deployment if errors occur option
is checked. If a command fails, you want to stop the deployment from continuing.
If you do not stop the deployment on errors, data will be lost. 
- When you return to the Change Commands page,
verify that data unload and load command files appear in the Define
Change Commands field.
Your data unload and load commands are displayed in the appropriate
order in the change commands list. Data unload commands are added first because
you need to unload your data before you drop a column or table. Data load
commands are added last.
You can view the syntax of your data unload
and load commands in a text editor by selecting the file from within the Deployment
Script Editor and clicking Edit.