Upgrading the DBB Db2 or Db2 for z/OS database
From time to time DBB adds a new feature or enhancement that requires updates to the database. The following table shows which version of the database schema is supported for each DBB 3.0.x version. Schema versions are named from the DBB version they were originally shipped with.
NOTE: For DBB versions with more than one supported schema version, upgrading to versions greater than the minimum version is optional and need only be upgraded to if you want the features or enhancements provided by that schema version.
| DBB version | Supported schema versions |
|---|---|
| DBB 3.0.0 | 2.0.2 |
| DBB 3.0.1 | 2.0.2 |
| DBB 3.0.2 | 2.0.2 |
| DBB 3.0.3 | 2.0.2, 3.0.3 |
The following table shows which features and enhancements are available in each database schema version.
| Features and Enhancements | Schema Version |
|---|---|
| DBB 3.0.x minimum level | 2.0.2 |
| Build map scalability optimization | 3.0.3 |
Upgrading Instructions
If you are upgrading to a DBB 3.0.x version from a DBB version ealier than the corresponding database version, complete the following steps to upgrade the database to the appropriate version.
NOTE: If updates are required for a release, the updates must be done before you can use the new release.
-
Stop all DBB processes including builds and server (if upgrading from pre-DBB 2.0 version).
-
Back up the current database by following established and verified procedures for your database. For example, for distributed Db2®, use the backup command to back up your database.
-
Run the appropriate upgrade SQL scripts located in the DBB installation on z/OS® UNIX, which by default are at
/usr/lpp/IBM/dbb/ddl/, for the supported databases to update the DBB database tables. Useupgrade_DB2_\*.sqlfor Db2® LUW andupgrade_DB2z_\*.sqlfor Db2® for z/OS® upgrades.
For example, for distributed Db2, copy the scripts to the Db2 instance and run the following command:db2 connect to DBB; db2 -stvf /path/to/scripts/upgrade_DB2_2.0.2.sql; db2 disconnect DBBFor Db2 for z/OS, you can use tools such as SUFI or Data Studio to run the scripts.
Notes:- Not every release has a corresponding upgrade script. Check the DDL directory for all the available upgrade scripts.
- You must run all the upgrade scripts, if they exist, between your currently installed version up to and including the target version.
- The database must be in sync with the code. Therefore, failure to run all the upgrade scripts that apply will cause the build to fail with an error that specifies which table is out of sync.
-
Review the output and verify that all database commands ran successfully.
-
If you need to roll back changes to the database, restore the database from the backup. For distributed Db2, use the restore command to restore the backup to the database.