Use this procedure to recover one or more databases through a Db2 single partition Windows server upgrade.
Before you begin
- Ensure that you are familiar with the details and restrictions discussed in Recovering through a Db2 server upgrade.
- Ensure that the backup image that is used to perform recovery is accessible and validated.
Important: As the instance owner, it is your responsibility to save your log files
before you start the recovery process. Saving your log files is necessary as some or all of the log
files in the active or mirror log paths might not be archived. The recovery procedure requires you
to drop the database, which deletes all of those log files.
Locate your primary
and mirror log files and save them to a folder. You will need them when you run the ROLLFORWARD
command (see step
8), and until a new online full
database backup is completed and verified.
Note: For multi-database environments, complete these
actions for all databases that require recovery.
Procedure
- As a user with SYSADM authority, log on to the
Db2 server. Run
list database directory to view the restore path of the database.
Note: For multi-database environments, complete these actions for all databases that require
recovery.
- As a user with SYSADM authority, log on to the Db2 server. Ensure that
you have saved your log files and then run
DROP DATABASE to drop all databases that need recovery in Db2
12.1.
- As the instance owner, run db2stop to stop the instance.
- Uninstall your Db2 copy through
Control Panel > Programs. This command does not remove the database
files.
- Run db2setup to recreate your Db2 copy. Run
UPDATE DATABASE MANAGER CONFIGURATION to restore the database manager
configuration parameter values for each instance.
- As the instance owner, run db2start to start the instance.
- For each database that needs recovery, run RESTORE
DATABASE. Running the command restores your databases from a pre-Db2
12.1
backup to the database paths listed in step 1.
- Run ROLLFORWARD DATABASE to roll forward all
databases that were restored in step 7 to a point in
time before the failure. Make the log files (that you
saved previously) available to the ROLLFORWARD command by copying them back into the active
log paths, or by including the OVERFLOW LOG PATH parameter in the command. If log
archiving is being used, ensure that the archive location is available. When the rollforward
operation hits SQL2463N or SQL2464N, the end of the release is reached.
- As the instance owner, run db2stop to stop the instance.
- Run UNCATALOG DATABASE to uncatalog all databases.
- Upgrade the instance.
- As the instance owner, run db2start to start the instance.
- Run CATALOG DATABASE to catalog all databases.
- For all databases that need recovery, continue the roll forward done in step 8 until complete.