Chapter 5. Deploying pre-configured databases 241
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.
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.
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.
ITSODB2 ITSODB
Script
Delta
New
Config Current
Config
11
2
Compare
3