Backup and recovery are processes that ensure that an SAP database can be re-instated with minimal disruption in operations after any kind of hardware, software, operational or environmental error or outage. These processes are a crucial factor in system availability and reliability.
Some of these processes are performed automatically by DB2 without any outside intervention, such as recovering the SAP database to its consistent state just before a z/OS system crash or an abnormal termination of DB2. Automatic recovery takes place at the next DB2 start. For other processes, there are integrated tools in DB2 that can be used for building efficient and reliable backup and recovery procedures.
Database administrators need to set up backup and recovery procedures for each individual SAP database. The characteristics of these procedures depend on:
· System availability requirements
· SAP database change rate
· SAP database size
· Hardware and software resources
An online backup of an object (tablespace, partition or index) is a copy of the object during which continuous, concurrent read/write activity on the object is allowed. Therefore, except for some processor and DASD overhead, the online backup has no impact on the concurrent SAP activities.
As it can contain uncommitted data, such a backup alone is not enough for the object’s recovery. DB2 complements it with the log.
There are two types of online backup:
As SAP systems contain a large number of tables, we recommend a volume-based approach to online backup. This approach allows you to easily create backups and to conveniently and efficiently recover to an arbitrary point in time.
Volume-based backups are copies of the volumes on which DB2 objects reside. This type of backup requires the availability of disk subsystems capable of generating very fast volume copies, such as IBM ESS or RVA, EMC Symmetrix, HDS Lightning, or StorageTek SVA.
The DB2 utility BACKUP SYSTEM invokes the DFSMShsm fast replication services of z/OS--which invokes FlashCopy--to take volume-based backups of all volumes on which DB2 objects reside. This method provides for a very efficient and non-disruptive means of making online backups of the entire SAP database. Concurrent read/write activity is always possible. The BACKUP SYSTEM utility takes either a full system backup or a data-only system backup. Using the utility option FULL, the backup contains both logs and data. The utility option DATA ONLY takes a backup of data only. The procedure for making volume-based backups under the control of DB2 is just to invoke BACKUP SYSTEM.
Recovering a system to a prior point in time using the RESTORE SYSTEM utility only requires backing up data. If data and logs are copied, normal DB2 restart recovery can be used to recover the system to the point in time of the backup copy.
The RESTORE SYSTEM utility recovers a DB2 subsystem to an arbitrary prior point in time. First, it restores volume copies that have been produced by the BACKUP SYSTEM utility. Then, it automatically applies the log to recover to an arbitrary point in time. The DSNJU003 (Change Log Inventory) utility with the CRESTART SYSPITR option allows you to specify the arbitrary point in time to which RESTORE SYSTEM recovers.
To recover a DB2 subsystem or data sharing group to the point in time at which a BACKUP SYSTEM FULL copy was taken, use HSM RECOVER * COPYPOOL(cpname) GEN(gen) to restore the database copy pool and the log copy pool and restart DB2.
Object-based backups are image copies of DB2 tablespaces, partitions and indexes that are created with option COPY YES. The DB2 COPY utility with the SHRLEVEL (CHANGE) option is an efficient tool for creating this type of backup. The utility generates backups of DB2 tablespaces, partitions and indexes. The DB2 utility RECOVER allows you to recover these objects.
SAP Database Administration Guide for SAP NetWeaver on IBM DB2 UDB for z/OS
High Availability for SAP on zSeries Using Autonomic Computing Technologies (available at www.ibm.com/servers/eserver/zseries/software/sap/docu.html)