Upgrading the database

The following procedure describes how to use DBLoader to update the database tables for your upgraded version:

  1. Uninistall the Database Loader by entering the following command (as an Administrator user on Windows or as a root user on UNIX):

    {INSTALL DIR}/DBLoader/_uninst/uninstall

    Important:
    Do not select Drop the database during the uninstallation. Dropping the database causes data loss if it has not been backed up. The existing database will be upgraded in subsequent steps.
  2. Refer to Platform, hardware, and software requirements to verify that your database meets the supported requirements for this release. Update as needed before continuing.
  3. Run the upgraded Database Loader from the media location, using the setup* launcher that is specific to your operating system. For example, enter:
    {CD_ROM/MEDIA DIR}/DBLoader/setup*
    Note:
    For Windows, make sure that you are logged in as the user that owns the database. That user is typically DB2ADMIN.

    Follow the guidelines below:

    1. Specify the same input values used in the previous version. For example: userids, passwords, database vendor, and so on. Version 4.2.2 and later saves the user input information to a file named install_cfg.properties, which you can use to review your previous input.
    2. Verify the configuration defaults and override them as needed.
    3. Do not select Run the SQL Files automatically.
      Note:
      You will receive a warning stating that the database already exists. You can safely ignore this warning.
  4. Run the BCGUpgrade*.sql script, located in the {INSTALL DIR}/DBLoader/scripts/DB2 or {INSTALL DIR}/DBLoader/scripts/Oracle directory.
    Note:
    Each BCGUpgrade_from-ver_to-ver.sql script must be run starting with the oldest version that applies to your system and continuing with each subsequent script.

    DB2

    Run the following commands:

    1. UNIX: su - db2inst1
      Windows: Start the DB2CLP
      Note:
      For Windows, make sure that you are logged in as the user that owns the database. That user is typically DB2ADMIN.
    2. db2start (if the database is not started)
    3. db2 connect to bcgapps (where bcgapps is the database name)
    4. cd {INSTALL DIR}/DBLoader/scripts/DB2
    5. Run one of the following scripts, depending on your existing version, to upgrade the database:

      4.2.0 to 4.2.1:
      db2 -td! -f BCGUpgrade_420_421.sql -z
       /tmp/bcgdbloader/logs/BCGUpgrade_420_421.log

      4.2.1.0 to 4.2.1 (Fix Pack 1 not installed):
      db2 -td! -f BCGUpgrade_421_421FP1.sql -z
       /tmp/bcgdbloader/logs/BCGUpgrade_421_421FP1.log

      4.2.1.1 to 4.2.2:
      db2 -td! -f BCGUpgrade_421FP1_422.sql -z
       /tmp/bcgdbloader/logs/BCGUpgrade_421FP1_422.log

      4.2.2 to 4.2.2.2 (Fix Pack 2 not installed):
      db2 -td! -f BCGUpgrade_422_422FP2.sql -z
       /tmp/bcgdbloader/logs/BCGUpgrade_422_422FP2.log

      4.2.2.2 to 4.2.2.3 (Fix Pack 3 not installed):
      db2 -td! -f BCGUpgrade_422FP2_422FP3.sql -z
       /tmp/bcgdbloader/logs/BCGUpgrade_422FP2_422FP3.log

      4.2.2.3 to 4.2.2.4 (Fix Pack 4 not installed):
      db2 -td! -f BCGUpgrade_422FP3_422FP4.sql -z
       /tmp/bcgdbloader/logs/BCGUpgrade_422FP3_422FP4.log

      4.2.2.4 to 6.0:
      db2 -td! -f BCGUpgrade_422FP4_600.sql -z
       /tmp/bcgdbloader/logs/BCGUpgrade_422FP4_600.log
    6. Run the save_inputs script to load the DBLoader user inputs into the database. For example:
      db2 -td! -f save_inputs.sql -z
       /tmp/bcgdbloader/logs/save_inputs.log
    7. Run the Set_Grants.sql script to set necessary permissions on the database. For example:
      db2 -td! -vf Set_Grants.sql >/tmp/bcgdbloader/logs/Set_Grants.log

    Oracle

    Run the following commands:

    Note:
    For Windows, you must be logged in as an Administrator user.

    1. cd {INSTALL DIR}/DBLoader/scripts/Oracle
    2. Run one of the following scripts, depending on your existing version, to upgrade the database:
      4.2.1.0 to 4.2.1 (Fix Pack 1 not installed):
      sqlplus -L bcgapps/password @BCGUpgrade_421_421FP1.sql
       >/tmp/bcgdbloader/logs/BCGUpgrade_421_421FP1.log

      4.2.1.1 to 4.2.2:
      sqlplus -L bcgapps/password @BCGUpgrade_421FP1_422.sql
       >/tmp/bcgdbloader/logs/BCGUpgrade_421FP1_422.log

      4.2.2 to 4.2.2 (Fix Pack 2 not installed):
      sqlplus -L bcgapps/password @BCGUpgrade_422_422FP2.sql
       >/tmp/bcgdbloader/logs/BCGUpgrade_422_422FP2.log

      4.2.2.2 to 4.2.2.3 (Fix Pack 3 not installed):
      sqlplus -L bcgapps/password @BCGUpgrade_422FP2_422FP3.sql
       >/tmp/bcgdbloader/logs/BCGUpgrade_422FP2_422FP3.log

      4.2.2.3 to 4.2.2.4 (Fix Pack 4 not installed):
      sqlplus -L bcgapps/password @BCGUpgrade_422FP3_422FP4.sql
       >/tmp/bcgdbloader/logs/BCGUpgrade_422FP3_422FP4.log

      4.2.2.4 to 6.0:
      sqlplus -L bcgapps/password @BCGUpgrade_422FP4_600.sql
       >/tmp/bcgdbloader/logs/BCGUpgrade_422FP4_600.log
    3. Run the save_inputs.sql script to load the DBLoader user inputs into the database. For example:
      sqlplus -L bcgapps/password @save_inputs.sql
       >/tmp/bcgdbloader/logs/save_inputs.log
    4. Run the Grants_Syns.sql script to set necessary permissions on the database. For example:
      sqlplus -L bcgapps/password @Grants_Syns.sql >/tmp/bcgdbloader/logs/
      Grants_Syns.log

Copyright IBM Corp. 2003, 2005