Upgrading the DBB Db2 or Db2 for z/OS database

From time to time DBB modifies or adds a function that requires updates to the database. The following table shows which database version is required for each DBB 3.0.x version.

DBB version Database version
DBB 3.0.0 2.0.2
DBB 3.0.1 2.0.2
DBB 3.0.2 2.0.2

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.

  1. Stop all DBB processes including builds and server (if upgrading from pre-DBB 2.0 version).

  2. 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.

  3. 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. Use upgrade_DB2_\*.sql for Db2® LUW and upgrade_DB2z_\*.sql for 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 DBB
    

    For 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.
  4. Review the output and verify that all database commands ran successfully.

  5. 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.