Documentation >
MAC-PAC Reference and Help >
Technical Support >
Key Concepts and Procedures >
Recovery Management >
Ensuring Data Integrity
Ensuring Data Integrity
MAC-PAC offers two techniques to ensure data integrity and to provide a way to recover from system problems:
· Commitment Control. Commitment control is used to handle transactions that update multiple files. It ensures that the data in all related files is kept in synch automatically.
· Journaling. Journaling records every change to a database file. If a problem occurs, you can reapply or roll back each change that has been journaled.
Commitment control prevents problems from occurring. Journaling helps you recover data integrity if a system failure occurs.
Commitment Control
MAC-PAC uses commitment control to manage updates. This technique changes the database only when all related updates can be done at the same time. For example, when you post a payment transaction, the system verifies that the open item, account balance, and payment files can all be updated. The update does not occur if any of the records to be updated are locked. If a problem occurs during the update, all related changes are backed out automatically. This processing keeps the database files in synch at all times.
Journaling
Journals record every change to every database file. The journal receiver contains the file update "journal entries." Each entry in the journal receiver contains the name of the updated file, the number of the job that updated the file, and before and after images of the updated record.
If a problem occurs with the system, you can recover the system by restoring the last backup tape and applying each entry recorded in the journal receiver(s) since that backup. This approach is called Rollforward. An alternate approach is to start with the current database and "un-apply" each entry in the journal receiver until the point before the failure occurred. The transactions are then re-entered. This approach is called Rollback. A discussion of rollforward and rollback techniques is provided later in this chapter.