Upgrading to 1.0.19.7

Important: Upgrading your system to version 1.0.19.7 (which replaces 1.0.19.6) is mandatory. It is a prerequisite for any further upgrades.

The IBM® Integrated Analytics System 1.0.19.7 upgrade process includes upgrading your Db2 database engine to version 11.5. The procedure is more complex than the standard IIAS upgrade, as it includes a number of pre- and post-upgrade steps to ensure that the database upgrades successfully. Read this section before running apupgrade.

Typically, a Db2 engine upgrade goes smoothly, however, there can be cases where a Db2 engine upgrade can hit some roadblocks which will need manual intervention. Fixing the Db2 upgrade issues can be very complex and time consuming depending on the nature of the Db2 engine changes which may include deprecated functionality.

Troubleshooting and fixing the encountered Db2 issues can potentially overflow the upgrade window of allotted maintenance time. In this scenario, it is possible to rollback to the previous version of Db2 until a solution is available. Db2 11.5 upgrade includes modifications to the catalog which has the potential to break an in-place upgrade which is why the option has been advocated.

When the upgrade is performed, prior to deploying the new Db2 11.5 container, a set of snapshots will be created automatically. A GPFS snapshot of all the key filesystems associated with the Db2 Warehouse container that are mounted from the IIAS platform will be performed. These snapshots will facilitate a roll-back of the Db2 engine to the point in time when the snapshot was created.

In the event the upgrade fails to complete and/or the Db2 engine upgrade encounters issues deemed unacceptable, the option to rollback the container with previous Db2 engine ( 11.1) can be realized. Note that once you successfully upgrade and start using the database, downgrading to the previous version is no longer supported.
Important: After a successful upgrade to 1.0.19.7, once you ensure that the database comes up and is operational, it is mandatory to delete filesystem snapshots. For instructions on how to delete them, refer to What to do next.

To learn more about new features, changes, deprecated or discontinued functionalities in the Db2 engine version 11.5, read What's new and What's changed in the Db2 11.5 Knowledge Center.

Note: If there are any questions regarding the following steps and/or if the upgrade is not successful, contact IBM Support. IBM Support can roll back to the previous version if advised, along with continued guidance to facilitate a successful upgrade.

Preparation for Db2 engine upgrade to 11.5

Follow all the steps mentioned in this task before you run apupgrade.

Procedure

  1. Ensure your IBM Integrated Analytics System is on 1.0.19.0, 1.0.19.1, or 1.0.19.2. If not, you must first upgrade to one of these versions.
  2. Save the Db2 level and version information by doing the following:
    1. Login to the database command line as bluadmin user. Follow the instructions under section Database administrator and users - database command line in Connecting.
    2. Store db2level and version information running the following commands:
      db2level >> /scratch/db2level.txt
      version >> /scratch/version.txt
  3. Prepare the system for a snapshot:

    When upgrading to 11.5, a snapshot is created by apupgrade for each filesystem associated with the Db2 Warehouse deployment. Before upgrading, it is good practice to ensure that any file systems (head, data, scratch, local, for example) that are at a high capacity or nearly full are cleaned up as much as possible before snapshots are created.

  4. Run the db2ckupgrade utility prior to upgrading to make sure that the database is ready for the upgrade. The command verifies that a list of conditions is true to succeed at the database upgrade. For more information, see Verifying the database before the upgrade.
  5. Resolve any indoubt transactions manually:

    If you use distributed transactions involving Db2 databases, ensure that the database does not contain any indoubt transactions. Learn how to resolve these transactions prior to upgrading the database at Resolving indoubt transactions manually.

  6. Check the integrity of offline backup:

    It is highly recommended that a full offline backup is available and planned for use with the upgrade in the event a data loss is encountered. It is best practice to test the integrity of a backup image to ensure that the image can be restored using the db_ckbkp command. This command has the same functionality as the db2ckbkp command. For more details on the db_ckbkp command (alias of db2ckbkp), see Backing up databases before or after upgrade.

Upgrading to 1.0.19.7

Once you completed the preparation steps for Db2 engine upgrade, proceed with the standard system upgrade procedure:

Procedure

  1. Follow the pre-check steps as described in Preparation steps.
  2. Follow the upgrade procedure as described in Upgrading with apupgrade.

Post-upgrade steps

When the upgrade is finished, run the following steps to verify that the Db2 engine upgrade was successful.

Procedure

  1. Check the location of any existing libraries for your external routines:

    Ensure that existing libraries for your external routines remain on the original location before the upgrade. If necessary, restore these libraries from the backup that you perform in Backing up Db2 server configuration and diagnostic information.

    Backup and restore of external routine library and class files

  2. Refresh materialized query tables:

    Refresh the data in existing materialized query tables by using the REFRESH TABLE statement.

    Materialized query tables (MQT) on unicode databases using language aware collation, where the MQT definition involves a LIKE predicate or substring function involved in a basic predicate, need to be refreshed.

  3. Ensure the upgrade was successful:
    Verify that your Db2 server upgrade was successful. The best practice is to ensure operations behave as expected. Examples of methods for ensuring the upgrade is satisfactory includes the following categories:
    • Verify that the connection to Db2 11.5.0 is successful:
      $ db2 connect to bludb
      Database Connection Information
      Database server = DB2/LINUXPPC64LE 11.5.1.0
      SQL authorization ID = BLUADMIN
      Local database alias = BLUDB
      $ db2level
      DB21085I This instance or install (instance name, where applicable:
      "db2inst1") uses "64" bits and DB2 code release "SQL11051" with level
      identifier "0602010F".
      Informational tokens are "DB2 v11.5.1.0", "s1910171200", "DYN1910171200PPCLE",
      and Fix Pack "0".
      Product is installed at "/opt/ibm/db2/V11.5.0.0".
    • Perform benchmark tests on your database applications and routines in your production environment and compare with the baseline results that you saved before the upgrade.
    • Tune your database applications keeping in mind guidelines related to:
      • Character conversion
      • Optimization class
      • Isolation level
      • Locks and concurrency
      • Parallel processing for applications
      • Query optimization
    • Tune your routines. Review important guidelines related to:
      • Stored procedures
      • SQL procedures
    • Remove dependencies on functionality that is deprecated in Db2® Version 11.5 in your database applications and routines before that functionality becomes discontinued. For more details, see Deprecated or discontinued functionality that affects Db2 server upgrades.
    • Adopt new Db2 11.5 functionality in database applications, where appropriate, to improve performance or add new functionality. Check the Sample files to understand how the new functionality works. For more details, see Adopting new Version 11.5 functionality in database applications and routines.
  4. Ensure log paths are active:

    Use the db_cklog utility to determine what log files in the active log paths are from the pre-Version 11.5 release. The db_cklog utility has identical functionality to the db2cklog feature described here:db2cklog - Check archive log file validity command.

What to do next

  • If issues arise in any steps above, restoring from an offline backup from the previous Db2 11.1 release may be indicated. Contact IBM support for assistance in restoring an offline backup.
  • If the upgrade was successful, and you ensure that Db2 is up and the database operates without issues, you must delete the snapshot created by apupgrade by using the apdbrollback tool.

    Run the apdbrollback command from platform as apuser from the master node on the system. This applies to both Single Rack and Multi Rack Systems.

    Usage:
    
    apdbrollback snapshot --delete [-y]
    Deletes all the snapshots present in the system
    
    Optional arguments
    -y | --yes
    If provided, skips the prompt
    Example:
    [apuser@node0101 ~]# apdbrollback snapshot --delete
    Please enter yes/no if you want to proceed with deleting all existing snapshots yes
    Successfully deleted snapshot for scratch on node0101-fab
    Successfully deleted snapshot for local on node0101-fab
    Successfully deleted snapshot for head on node0101-fab
    Successfully deleted snapshot for data on node0101-fab
    Successfully deleted snapshots for all filesystems

    If you do not run this step, the following alert will remain open in your system: 902: Stored snapshots reduce available storage.