Oracle Block Change Tracking(BCT) and the ZDLRA
One of the most commonly asked question I get when explaining how the ZDLRA works has to do with Block Change tracking.
The question is usually something like...
"If the the Block Change Tracking file only keeps 7 days of history by default, how does it work with the ZDLRA where you only perform a full backup once"?
"If I only perform incremental cumulative backups, how does it use the BCT if it get's recreated/invalidated ?"
So how is the BCT file used ?
First, I am assuming you understand what's in it. This is explained in my previous post
For full backups -
The BCT file is not used, but it is updated prior to the backup if any changes took place.
Since the datafiles are "fuzzy" (being updated), the next BCT record starts with SCN number prior to the checkpoint SCN of the backup
Since the datafiles are "fuzzy" (being updated), the next BCT record starts with SCN number prior to the checkpoint SCN of the backup
For Incremental Cumulative/Differential backups -
The BCT file is updated prior to the incremental cumulative if any changes took place.
RMAN then determines starting SCN and ending SCN number to backup, and if a BCT can possibly be used.
Once RMAN determines the starting/stopping SCN for the backup, and verifies that the BCT is in use, it can then determine if the BCT was capturing changes for the backup period, and if the changes fall within BCT capturing period
Now at this point we have determined
Once RMAN determines the starting/stopping SCN for the backup, and verifies that the BCT is in use, it can then determine if the BCT was capturing changes for the backup period, and if the changes fall within BCT capturing period
Now at this point we have determined
- BCT was in use
- The backup period falls within the window that the BCT has complete, valid records for.
Now we need to determine if any changes took place, and if so, build the list of blocks to backup up. Keep in mind that if there are no version records, this means that no changes were made.
NOTE : if using multiple backups strategies, and TAGS to identify backups, this will complicate the process.
ZDLRA PROCESS
For the ZDLRA, the process is very simple. As you go through the steps, you see that that new version records are created for each datafile that has any changes since the last backup (regardless of the backup type).
When an incremental cumulative backup is executed and sent to the ZDLRA, the RMAN catalog on the ZDLRA get's updated with the virtual Full. The RMAN client, which uses this catalog, compares against the checkpoint scn of the last full backup in the catalog (the virtual full).
Because the RMAN client is using the RMAN catalog from the ZDLRA (containing the virtual fulls), the RMAN client always compares to the last virtual full.
Keeping 7 days of BCT history isn't an issue because the current RMAN incremental cumulative backup always compares to the previous incremental cumulative backup which is virtualized.
Love this. Was bothering me for a while.
ReplyDelete