As we have discussed in Oracle GoldenGate Checkpoints, Oracle GoldenGate extract has two main checkpoints: read checkpoint and write checkpoint. The read checkpoint is related to the data source which keeps the redo or transaction log reading positions. The write checkpoint is related to the trail files created by the extract process. The read checkpoint includes current checkpoint and recovery checkpoint:
- The current checkpoint is the position where all the committed transaction data are written to the trail file.
- The recovery checkpoint is the position when the oldest open transaction starts.
The extract can perform two types of recovery:
- Normal Recovery: When extract restarts, the recovery begins at the recovery checkpoint. This is a normal recovery.
- Bounded Recovery (BR): When the extract restarts, the recovery begins with the recovery checkpoint but will use the boundary recovery checkpoints (stored in boundary checkpoint file) to restore the open transactions from persisted-object files created at each boundary recovery checkpoint. Then it skips all the committed transactions before the current checkpoint. This is the bounded recovery.
BRINTERVAL specifies the time between Bounded Recovery checkpoints. This is known as the Bounded Recovery interval. The minimum interval is 20 minutes. The maximum is 96 hours. The default interval is 4 hours.
Please keep at least the archive log files with time =2*BRINTERVAL. For example, with default BRINTERVA=4 hour, you need to keep at least 8 hours of archive log file.
"It is important to understand though that as far as bounded recovery goes, a transaction doesn’t become long running as soon as it is older than 4 hours. It is only considered long running when it is older than 4 hours at the next BR checkpoint. Therefore, in a worst case scenario it might be 3h 59m 59s old at the first BR checkpoint and therefore 7h 59m 59s old at the second checkpoint (and only then recorded). This is why Oracle say you should keep 8 hours of archive logs on disk."[2]
The following diagram shows an example of a normal extract recovery process. The extract process will go back to recovery checkpoint (2:16:45pm) to recover open transactions, skip committed transactions before the current checkpoint (2:16:50pm), and then start the normal processing from the current checkpoint (2:16:50pm).