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:
- Transfer pre-DB2 Version 10.5 online database backup files for all the databases
that you want to upgrade to the DB2 server.
- 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.
- 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.
- Log on to the DB2 server
as a user with SYSADM authority.
- 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.
- 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
- Upgrade the DB2 server
by using one of the following tasks: