￿Flexibility: Upgrading an existing database might not be as straightforward as it appears:

Keeping data in an existing database is difficult, especially if table layout has changed.

Redirected restore might be required if the storage device on the target system is different from those defined in the backup image.

Using scripts

Using scripts is the most flexible method and gives you total control with the deployment process. The trade-off is that scripts have to be created either manually or by a tool, data loading can take time, and additional tests are required to ensure that no errors are introduced on the manually created database.

5.1.1 Sample database

In this chapter we use a sample database named ITSODB for our examples. This database consists of a subset of objects from the SAMPLE database that comes with DB2.

We have taken, from the SAMPLE database, the minimum objects that are sufficient to demonstrate our pre-configured database deployment examples. We have the following database objects in ITSODB:

￿Table

￿Index

￿Summary table

￿Primary key

￿Foreign key

￿View

￿Stored procedure

￿Function

￿Trigger

￿Alias

￿Check constraint

￿Table space

Chapter 5. Deploying pre-configured databases

215

Page 229
Image 229
IBM DB2 manual Sample database, Using scripts, 215, Deploying pre-configured databases