When you know the exact changes that you want to move from
one database to another, you can use drag and drop operations. You
drag the objects from the database that you want to migrate objects
from to the change management script for the database that you want
to migrate object to.
Before you begin
Connections must exist to the database from which you want
to move changes and for the database that you want to move the changes
to. The objects that you are moving must not exist at the database
where you want to move them.
About this task
To migrate changes from one database to another with drag
and drop operations, complete the following steps:
Procedure
- Create a change management script. In the Administration
Explorer, right-click the Change Management
Scripts folder for the database that you want to migrate
changes to and click New Database Change. A new change management script is created, and the change
management script is displayed in the Change Management
Script Editor.
A data design project is automatically
created in the Data Project Explorer. The name
of the data design project is the name of the database connection.
If a data design project with the name of the database connection
exists, the name of the new data design project is the database connection
name with a numeric suffix. The data design project contains and manages
the resources that are required to implement the changes to the actual
database.
Tip: To reuse an existing change management
script, complete the following steps to reset the script:
- If the change management script is already open, click the tab
for the script to ensure that the script is highlighted. Otherwise,
in the Administration Explorer, expand the Change
Management Scripts folder. Double-click the change management
script that you want to open.
- From the main menu, click .
- Find the objects that you want to migrate and
drag them to the Change Management Script Editor.
- In the Administration Explorer,
expand the database from which you want to migrate changes.
- Click the folder for the type of object that you want
to migrate. The Object List opens.
- Move the Object List so that you
can see both the Object List and the Change
Management Script Editor side by side. To move the Object
List, click its title bar and drag the title bar until
the mouse pointer becomes a drop cursor, then release the left mouse
button.
- In the Object List view, find and
select the objects or objects to migrate.
- Drag the object or objects to the Change Management
Script Editor.
Complete these steps until you have moved all the objects
that you want to migrate. The Change Management Script
Editor shows the list of objects that were migrated to
the database and the changes that will be made to the database.
- In the Change Management Script Editor,
assess any other objects that might be impacted by migrating the changes
to the target database.
- In the Objects to be Changed list,
click each object. Objects that are affected by the objects that are
being migrated are displayed in the Impacted Objects list.
- Include impacted objects in the change management script.
Use the Alter and Drop buttons
to move the impacted objects to the Objects to be Changed list.
If you use the Alter button to move an impacted
object, you can click the object and make any necessary changes to
the object in the Properties view.
- Click Preview Commands to display
the generated commands in the Commands section
and review the commands.
To review a summary
of the changes that will be made to the database, click View
Change Report.
- Click Data Options to start the Customize
Data Preservation wizard and complete the steps in the
wizard. You might want to customize which DB2 maintenance
commands are generated.
- Review the regenerated commands
- Click Run to start the Deploy
Change Commands wizard.
- Review the change commands and click Finish to
deploy the changes to the actual database catalog.
Results
You have migrated changes from one database environment to
another without moving the data in those objects.