DB2 Version 9.7 for Linux, UNIX, and Windows

DB2 command actions to upgrade instances and databases

Learning what actions take place when you invoke the commands to upgrade instances and databases gives you a better understanding of the upgrade process for DB2® servers.

Instance upgrade
When the instance upgrade is called explicitly using the db2iupgrade command, or implicitly when you install DB2 Version 9.7 on Windows and select the Work with Existing option and then choose a pre-Version 9.7 copy with the upgrade action, this command:
  • Upgrades an existing instance to a new instance under a DB2 Version 9.7 copy.
  • Upgrades instance profile registry variables. The global profile registry variables set by the user are not upgraded.
  • Upgrades the database manager configuration (dbm cfg) file.
  • Sets the jdk_path dbm cfg parameter appropriately.
  • Upgrades the db2audit.cfg audit configuration file when the audit facility is enabled.
  • Uses the SSLconfig.ini SSL configuration file to set the new database manager configuration parameters to the corresponding SSL parameter value in this file and upgrades the instance profile registry setting DB2COMM=SSL.
  • In a Microsoft Cluster Server (MSCS) environment, defines a new resource type, updates all DB2 MSCS resources to use the new resource type, removes the old resource type, and brings all resources online.
For a successful instance upgrade, it is essential that all files for all instances exist and that write access is granted. However, review upgrade restrictions for particular scenarios that are not supported.
Database directory upgrade

When you access the database directory the first time, it is implicitly upgraded if necessary. The database directory is accessed when you issue commands such as LIST DATABASE DIRECTORY or UPGRADE DATABASE command.

Database upgrade
When the database upgrade is called explicitly using the UPGRADE DATABASE command, or implicitly using the RESTORE DATABASE command from a pre-Version 9.7 database backup, the following database entities might be converted during database upgrade:
  • Database configuration file
  • Log file header
  • Table root page for all tables
  • Index root page for all tables
  • Catalog tables
  • Buffer pool files
  • History file

For recoverable databases, the UPGRADE DATABASE command renames all log files in the active log path with the extension .MIG. After you upgrade your databases successfully, you can delete all the S*.MIG files. Refer to Post-upgrade tasks for DB2 servers for details.

The UPGRADE DATABASE command upgrades the files SQLSPCS.1, SQLSPCS.2 , SQLSGF.1, and SQLSGF.2 to support new functionality on automatic storage table spaces such as removing storage paths from a database and rebalancing automatic storage table spaces after you add or drop storage paths from a database.

The UPGRADE DATABASE command automatically collects statistics for all system catalog tables during database upgrade. The following table shows the RUNSTATS command called for the automatic collection of statistics:
Table 1. RUNSTATS command for automatic statistics collection
auto_runstats User profile RUNSTATS command
Enabled Exists RUNSTATS command with the SET PROFILE parameter using the information in the STATISTICS_PROFILE column in SYSCAT.TABLES.1
Enabled Does not exist RUNSTATS command with default parameters
Disabled N/A RUNSTATS command from the packed descriptor for the most recent call to the RUNSTATS command.2
Note:
  1. If you are upgrading databases from DB2 UDB Version 8 FixPak 8 or lower level (Version 8.2 FixPak 1 or lower level), the automatic collection of statistics does not occur. You have to manually collect statistic after upgrading your databases.
  2. If statistics were previously collected for the table, the RUNSTATS command is issued as indicated in the table. If there are no statistics collected for the table, the RUNSTATS command is not issued.

The automatic collection of statistics for all system catalog tables ignores any exclusion policies defined in the health monitor. Also, if you have manually modified your system catalog table statistics via updates to SYSSTATS views, manually reissue these updates to the SYSSTATS views.