Events that occur during recovery
During recovery, several events occur, such as reading the log and running utilities that rely on image copies of the data.
Figure 2 shows an overview of the recovery process. To recover a page set, the RECOVER utility typically uses these items:
- A backup that is a full image copy or a system-level backup.
- For table spaces only, when the COPY utility is used, any later incremental image copies; each incremental image copy summarizes all the changes that were made to the table space from the time that the previous image copy was made.
- All log records for the page set that were created since the image copy. If the log has been damaged or discarded, or if data has been changed erroneously and then committed, you can recover to a particular point in time by limiting the range of log records that are to be applied by the RECOVER utility.
In the example shown in Figure 2:
- Where the COPY utility is used, the RECOVER utility uses information
in the SYSIBM.SYSCOPY catalog table to:
- Restore the page set with the data in the full image copy (appearing, in Figure 2, at X'38000').
- For table spaces only, apply all the changes that are summarized in any later incremental image copies. (Two copies appear in Figure 2: X'80020' and X'C0040'.)
- Apply all changes to the page set that are registered in the log, beginning at the log RBA of the most recent image copy. (In Figure 2, X'C0040', that address is also stored in the SYSIBM.SYSCOPY catalog table.)
Figure 1. Overview of Db2 recovery from COPY utility. The figure shows one complete cycle of image copies. The SYSIBM.SYSCOPY catalog table can record many complete cycles. - Where the BACKUP SYSTEM
utility is used, the RECOVER utility uses information in the BSDS
and in the SYSIBM.SYSCOPY catalog table to:
- Restore the page set from the most recent backup, in this case, it is a system-level backup (appearing, in Figure 2 at X'80000').
- Apply all changes to the page set that are registered in the log, beginning at the log RBA of the most recent system-level backup.
Figure 2. Overview of Db2 recovery from BACKUP SYSTEM utility. The figure shows one complete cycle of image copies. The SYSIBM.SYSCOPY catalog table can record many complete cycles.