Data recovery in data sharing environments
Db2 recovers data from information that is contained in both the logs and the bootstrap data sets (BSDSs) of members. However, because updates can be logged on several different members, Db2 coordinates recovery by using the SCA in a coupling facility.
- Member names
- BSDS names
- Database exception status conditions about objects and members in the group
- Recovery information, such as log data set names and the list of indoubt XA transactions
You can stop and start an individual member of a data sharing group while the other members continue to run. The startup process for each member is similar to that of non-data sharing Db2 subsystems.
Db2 uses a process called group restart in the rare event that critical resources in a coupling facility are lost and cannot be rebuilt. When this happens, all members of the group terminate abnormally. Group restart rebuilds the lost information from individual member logs. However, unlike data recovery, this information can be applied in any order. Because there is no need to merge log records, Db2 can perform many of the restart phases for individual members in parallel.
The RECOVER utility
You can run the RECOVER utility from any member of a data sharing group. The process for data recovery is basically the same for a data sharing group as it is for non-data sharing Db2 subsystems. However, updates to a single table space can be the work of several different members. Therefore, to recover an object, Db2 must merge log records from the appropriate members, using a log record sequence number (LRSN). The LRSN is a value derived from the store clock timestamp and synchronized across the members of a data sharing group by the Sysplex Timer.
System-level point-in-time recovery
You can perform system-level point-in-time recovery by using the BACKUP SYSTEM and RESTORE SYSTEM online utilities.
- BACKUP SYSTEM online utility
This utility provides fast, volume-level copies of Db2 databases and logs. It automatically keeps track of which volumes need to be copied. Using BACKUP SYSTEM is less disruptive than using SET LOG SUSPEND in copy procedures because the log write latch is not taken. An advantage for data sharing is that BACKUP SYSTEM has group-scope, whereas SET LOG SUSPEND has only member scope.
- RESTORE SYSTEM online utility
This utility provides a way to recover a data sharing group to a specific point in time. RESTORE SYSTEM automatically handles any CREATE, DROP, and LOG NO events that might have occurred between the backup and the recovery point in time.