![]() |
Save and recover a database
Several problems may occur in a relational database system, causing data loss and inconsistency. An electrical default could bring the computer to a complete stop ; the disk storing the data could be damaged ; a user could drop out a table by mistaking its name. Database recovery must be able to correct these data during such an abnormal event.
The following problems could occur :
SYSTEM FAILURE : The relational server could stop abnormally due to error conditions or power failure.
DASD FAILURE : The system may not be able to read or write data on the disk which may have been damaged; such an error can occur on a log or a storage pool of the relational database.
APPLICATION FAILURE : An application program may end abnormally.
USER EXIT ERRORS : The system or application performs a function, which in turn induces an error : for example, when the user (or the application program does not specify the right function).
It is therefore essential to perform regular back-up procedures.
Standard archiving is a FULL BACKUP, that is to say, the whole database is backed-up.
If a problem occurs, standard recovery is a FULL RESTORE, that is to say, the whole database is recovered.
BACKSTORE gives invaluable assistance to the person in charge of the management and maintenance of DB2 bases
in the event of such problems. Furthermore, incremental back up will considerably reduce back up times.
Recovery after System Failure or DASD failure
BACKSTORE is usually used to archive databases in the event of an incident on one of these bases which requires restoring.
The BACKUP function enables the whole database to be archived on a tape, disk or both supports simultaneously.
A report giving a list of all the tables to be reloaded is also edited.
If there are any problems, it is possible to restore all the database from a BACKUP archive using the RESTORE function.
Recovery after Application Failure or User Logic Errors
Using the UNLOAD function, BACKSTORE can also perform partial backups of the database with a view to further reloads.
Up to 90 dbspaces can be unloaded simultaneously using the UNLOAD function.
Up to 90 tables can be reloaded from the files created by UNLOAD, BACKUP or DB2 archives .
BACKSTORE allows the user to reload a particular table (up to 90 tables simultaneously) from an archive.
In such a case it is possible to restore assigned tables and to apply a "point in time" recovery by using
Log files (Current Log and Log Archives).
During a table recovery, indexes, reference integrity, views, grants, comments and labels are recreated.
If the table is replaced by the previous image, all the labelled modifications in the log files will be lost.
Forward Recovery processing will apply all these modifications on the reloaded tables.
BACKSTORE provides all the functions necessary to run Forward recovery.