A DBMS must be able to restore the database (or return it to a known condition) in the
event of a system failure. This may include; operator error, incorrect or invalid data,
program errors (soft crash) and hard disk crashes, natural catastrophes (hard crash).
Large DBMSs may have the ability to "Rollback" transactions to a specified
point (enables rollback and roll forward), or backout to a specified point (actually
nullifies transactions)
A distributed database has additional problems to deal with than a centralised
database. This includes communications link failure (lost messages). Hence recovery here
may be once a message is deemed lost, asking for the message to be resent.
Commonly used techniques
- Restore/rerun - reprocessing the day's transactions against the backup
copy of the database.
- Backward recovery - (rollback). Eg customer A has $100 transferred to
customer B, and the process fails after $100 has been deducted from Customer A. Rollback
will "undo the Customer A" transaction.
- Forward recovery - (rollforward). Starts with an earlier copy of the
database and applies after images (the results of good transactions).
Most PC-DBMSs have few if any constructs to assist in recovering corrupt data bases or
in rollback of partial transactions.
Users of a PC-DBMS should periodically backup or copy critical database components.
McFadden, Hoffer (1994)
dBASE
- When a record is deleted in a database, initially it is just "Marked for
deletion". this means that a record may be recovered by undeleting the record.
- To permenantly delete a record the relational table containing the record is
"PACKED".
- If the index or file is corrupted a "PACK and REINDEX" may be issued to
update the table and rebuild the indexes.
- In general if a file error occurs you should recover from backup.
MS-Access
- Repairing a Database
- You may need to repair a database if Microsoft Access quits unexpectedly: for
example, if there is a power outage or your computer experiences a hardware problem. The
database won't become corrupted if you quit Microsoft Access normally.
- To repair a database, from the File menu in the Microsoft Access Startup window,
choose Repair Database.
- Notes
- When you open, compact, encrypt, or decrypt a corrupted database, Microsoft
Access asks if you want to repair the database. If you choose [OK],
Microsoft Access repairs the database.
- In some situations, Microsoft Access may not detect that a database has become
corrupted. If a database behaves unpredictably, use the Repair Database command to repair
it.
[Rev 24/9/98] 30/4/97 © 1997-98 V/2-Com (Verhaart), P O Box 8415,
Havelock North, New Zealand.