Show TOC

Recovery with IBM DB2 for iLocate this document in the navigation structure

Use

To minimize downtime in the event of failure with loss of production data, you must make sure that you can quickly recover your IBM DB2 for i database. You can reduce the risk of disk failures by a protection mechanism such as device parity protection (also known as RAID). However, there is still a small chance that you lose disk data when more than one unit fails at a time. You can also lose data by environmental causes, software errors, or operator mistakes.

Prerequisites

If you lose data because of disk failures in an auxiliary storage pool (ASP), all data in that ASP must be restored because it is impossible to associate the data with specific disk units. If the affected ASP is the system ASP, you must also restore the licensed internal code, the operating system, and all other system data.

Depending on your backup strategy, it may be necessary to restore system and application data from different sets of backup media in the correct order. It might also be necessary to recover journalled changes between the backup time and the point in time right before the failure.

If you did not lose the complete system, but only corrupted some application data, we recommend that you delete the old, corrupted application data before restoring the data from the backup. This way you avoid unpredictable problems due to duplicate object names, wrong object owners, or damaged objects.

Process
  1. If you need to restore the complete system, install the Licensed Internal Code. Otherwise delete the old, corrupted data that you want to restore from your backup and continue from step 4.

  2. Restore your disk configuration or configure disk units manually according to your needs. If you are about to restore database libraries, and the associated journal receivers reside in a separate ASP, make sure that you do not erase the journal receiver ASP during this step.

  3. To install the operating system and restore system data such as user profiles, proceed as follows:

    • Install the operating system

    • Restore configuration data using the command RSTCFG

    • Restore user profiles using the command RSTUSRPRF

  4. To restore the application data, proceed as follows:

    • Restore objects in libraries using the command RSTLIB

    • Restore objects in the integrated file system using the command RST

  5. If you have restored the complete system, you need to restore authorities by entering the command RSTAUT .

  6. To recover journalled changes between the time of the backup and the point in time right before the failure, enter the command APYJRNCHGX .

    To ensure consistency in the database, leave the default parameter CMTBDY(*YES) .

    To allow the command to continue in case it finds a journal entry that it cannot recover, select the parameters OPTION(*IGNINQMSG) OBJERROPT(*CONTINUE) .

    Note

    If your backup has been done in online mode with partial transactions, the recovery of journalled changes is mandatory.