DB2 10.5 for Linux, UNIX, and Windows

Upgrading a DB2 server by using online backups from a previous release

You can rebuild your database on a previous release by using online database backups from the same release and then upgrade to DB2® Version 10.5.

Before you begin

Before upgrading your DB2 server:
  • Ensure that you have root access on Linux and UNIX operating systems or Local Administrator authority on Windows.
  • All necessary full or incremental online pre-DB2 Version 10.5 database backups of your databases so that you can rebuild your databases by using these online backups.

Restrictions

Perform this task only under the following conditions:
  • If you cannot upgrade the existing instances and databases.
  • If you did not perform full offline database backups recently or incremental offline database backups as indicated in Pre-upgrade tasks for DB2 servers.

Procedure

To upgrade a DB2 server by using online backups from a previous release:

  1. Transfer pre-DB2 Version 10.5 online database backup files for all the databases that you want to upgrade to the DB2 server.
  2. If you do not have a DB2 copy with the same version as the online database backups, install a DB2 copy of the same version. For example, if you performed the online database backups from a DB2 Version 10.1 copy, you must have a DB2 Version 10.1 copy installed on the DB2 server.
  3. If you do not have an instance running on the DB2 copy with the same version as the online backups, create an instance under this DB2 copy.
  4. Log on to the DB2 server as a user with SYSADM authority.
  5. Rebuild your databases by using the RESTORE DATABASE command with the REBUILD WITH ALL TABLESPACES IN DATABASE parameter followed by the ROLLFORWARD DATABASE command. For example:
    RESTORE DB db-name 
            REBUILD WITH ALL TABLESPACES IN DATABASE
            TAKEN AT timestamp-backup;
    ROLLFORWARD DB db-name 
            TO END OF LOGS AND STOP;

    You can choose to rebuild your database with just a subset of table spaces. However, you must drop all table spaces in restore pending state after you issue the ROLLFORWARD DATABASE command. You cannot upgrade databases with table spaces in restore pending state.

  6. Verify that the databases that you rebuild are in consistent state by issuing the GET DB CFG command as shown in the following example for Windows operating system:
    db2 GET DB CFG FOR sample | FIND "consistent"
    
    All committed transactions have been written to disk = YES
  7. Upgrade the DB2 server by using one of the following tasks: