Availability Guide for Application Design
Data Protection and Recovery
Availability Guide for Application Design—525637-004
4-29
Solution Using a Database Snapshot
to run the transaction again if a failure causes the transaction to abort. If your batch
application runs as a process pair, then you must checkpoint this information to the
backup. Refer to Section 7, Availability Through Process-Pairs and Monitors, for
information on checkpointing.
Solution Using a Database Snapshot
A database “snapshot” makes an accurate copy of the database to disk, where the
information is frozen while the batch program executes on it.
When to Use This Approach
This approach works well for any read-only batch operations. It is useful in that you can
quickly take a frozen snapshot. This way, the batch program can operate on the
snapshot while the transaction-processing application continues to perform online
transactions against the primary database. Once the batch program is finished, the
application must synchronize the duplicate database with the primary database.
How Database Snapshots Work
Figure 4-10 on page 4-30 shows database activity for performing batch-like activities
with and without a batch window. Both parts of the figure show a typical timeline for
applications that perform both online operations and batch operations.
The first part of the figure shows a typical approach using a batch window. The
application performs online operations, stops to run some batch work, and then
continues online. In this example, the application takes a backup before starting the
batch operation. This backup provides a fallback point in case the batch operation fails.
Upon finishing the batch operation, an online dump is taken and reports are generated
before online operations start again.
The second part of the figure shows how the batch window can be eliminated by
changes in the way data is handled. Although a period of time exists in which batch-
type operations are performed, online transactions take place simultaneously and
uninterrupted by the batch activity. Snapshots on disk replace the tape dumps. Such a
snapshot provides a view or historical record in a comparatively short period of time.
Because the snapshot takes little time, the effect on online operations is minimal.
What Are the Design Implications for Database Snapshots?
To make your snapshot of the database, you can either use RDF or write your own
application to perform remote duplicate transactions. Specific design implications exist
in either case. Refer to Duplicate Databases on page 4-12 for overviews of using these
techniques to generate a backup database.
Using RDF
The simplest approach is to use RDF. Here, you create your snapshot by using RDF
commands to stop updates to the backup database while you run your read-only batch