Reasons to journal before-images
When you journal an object, the system always writes an after-image for every change that is made. You can request that the system write before-image journal entries for database files and data areas. All other object types only journal after-images. This significantly increases the auxiliary storage requirements for journaling.
However, you can choose to journal before-images for these reasons:
- Before-images are required for a backout recovery, where you remove journal changes with the Remove Journaled Changes (RMVJRNCHG) command rather than applying journal changes to a restored copy of an object. Backout recovery is often complex, particularly if multiple users and programs are accessing the same object. It is most commonly used when new applications or programs are being tested.
- For database physical files, before-images are required to use the Compare Journal Images (CMPJRNIMG) command. This command highlights the differences between the before-images and after-images. It is sometimes used to audit changes to a database file.
- For database physical files, if you want a copy of the record that is deleted to be part of the deleted record journal entry information, specify before-images.
- Commitment control requires before-images for the system to roll back uncommitted changes. When you open a database file under commitment control, the system automatically journals both before-images and after-images while the commitment definition is active. If you normally journal only after-images, the system writes before-images only for the changes made under commitment control. If the system initiates the journaling of before-images, you cannot use them to remove journaled changes. Commitment control does not support integrated file system objects, data areas, or data queues.
- Access path journaling also requires before-images for the system to use for IPL recovery. When you journal access paths, or the system journals an access path to provide system-managed access-path protection, the system will automatically journal both before and after-images. If you normally journal only after-images, the system also writes before-images if you are journaling the access path.
You can select before-images on an object-by-object basis. You specify whether you want after-images or both when you start journaling for a database file or a data area. After you start journaling a database file or a data area, you can use the Change Journal Object (CHGJRNOBJ) command to change whether you are journaling before-images.
Parent topic:
Planning which objects to journalRelated concepts
System-managed access-path protection