Ways to Reduce Recovery Time
It is often critical to recover a database as quickly as possible to meet availability demands. The length of time it takes to recover can be reduced by:
Limiting Scope of Recovery
One of the most significant factors affecting recovery time is the number of files being recovered. If recovering due to an I/O error, only a single file may need to be recovered. If recovering due to a journal I/O error, it may be necessary to recover all files in the database. To reduce time, recover only those files or areas impacted by the failure.
Reducing Time Between Backups
Another factor that affects recovery time is the number of journal images that must be applied to a restored file. One way to reduce the volume of journal images is to backup more frequently. Backups should be taken frequently enough that recovery times meet your operational requirements.
Sorting Journal Images
Another way to reduce the number of journal images applied to a restored file is to use the SORTED option of the ROLLFORWARD or ROLLBACK utility statement. By specifying this option, only the last AFTR image (in the case of ROLLFORWARD) or the first BFOR image (in the case of ROLLBACK) is applied to the database. While time and resources are required to sort the journal images, the number of I/Os to the database (and therefore the length of time needed to recover) may be significantly reduced using this option.
Note: There are restrictions on the use of the SORTED option when recovering from a hot backup. For more information, see 21.5.2, “Recovery From a Hot Backup”.
Preprocessing Archive Files
Another way to reduce the time needed to recover is to preprocess journal images using the EXTRACT JOURNAL utility statement. This utility eliminates redundant journal images by retaining only the last AFTR image for a dbkey. It creates an output file (called an extract file) that subsequently can be used as input to the ROLLFORWARD utility statement.
A backup plan may include the regular use of EXTRACT JOURNAL to pre-process archive journal files. If a recovery then becomes necessary, the extract files already exist and can be used in place of the original archive files to reduce the volume of journal images that must be applied to the database, thereby reducing the length of time it takes to recover.
To illustrate how this may be done, the EXTRACT JOURNAL utility might be executed each night. Its input would consist of all archive files produced since the previous night's extract or since the previous backup, whichever occurred most recently. If a recovery becomes necessary, the EXTRACT JOURNAL utility must be executed one more time to process the remaining archive files. After the database files are restored from the backup, the ROLLFORWARD utility is used to reapply updates. Its input is the concatenated set of extract files produced since the backup.
Note: There are restrictions on the use of extract files when recovering from a hot backup.
More Information
|
Copyright © 2014 CA.
All rights reserved.
|
|