Purging Archive Logs
An Oracle archive log can be purged safely once Extract's read and write checkpoints are past the end of that log. Extract does not write a transaction to a trail until it has been committed, so Extract must keep track of all open transactions. To do so, Extract requires access to the archive log where each open transaction started and all archive logs thereafter.
Extract reads the current archive log (the read checkpoint) for new transactions and also has a checkpoint (the recovery checkpoint) in the oldest archive log for which there is an uncommitted transaction.
Use the following command in GGSCI to determine Extract's checkpoint positions.
INFO EXTRACT group
, SHOWCH
-
The
Input Checkpoint
field shows where Extract began processing when it was started. -
The
Recovery Checkpoint
field shows the location of the oldest uncommitted transaction. -
The
Next Checkpoint
field shows the position in the redo log that Extract is reading. -
The
Output Checkpoint
field shows the position where Extract is writing.
You can write a shell script that purges all archive logs no longer needed by Extract by capturing the sequence number listed under the Recovery Checkpoint
field. All archive logs prior to that one can be safely deleted.