3

 

ITSODB2

Script

ITSODB

1

Delta

1

 

 

New

2

Current

Config

 

Config

 

 

 

Compare

 

Figure 5-3 Identify and apply changes

￿ Get the configurations for the two databases.

￿ Compare the two configurations and create the set of DDL and SQL statements that will migrate the target database.

￿ Apply the delta script to the target database.

Important: Backing up the target system is very important for this task. Because you make changes directly on the target database, if anything goes wrong during the migration, you might not be able to rollback the changes. Therefore, a backup is required.

5.5.1 Updating non-table objects

Non-table objects are objects that have no direct influence on data in the tables. These are objects such as stored procedures, functions, and views. Updating these objects is fairly easy because no user defined data is touched. You can simply drop the database objects and recreate them. You can either do a delta change only, or completely drop and recreate all non-table objects.

The only issue you have to keep in mind concerns the dependencies between the non-table objects and the tables they interact with. For instance, you cannot create a view unless the underlying tables are in place. Follow this sequence to avoid this problem:

1.Drop non-table objects.

2.Update the tables.

3.Recreate non-table objects.

Chapter 5. Deploying pre-configured databases

241

Page 255
Image 255
IBM DB2 manual Updating non-table objects, 241