Posting from the UKOUG (UK Oracle User Group) conference. The most interesting detail I picked up today came from a presentation by Alex Gorbachev of the Pythian Group, a company that specialises in remote DBA operations – and probably does it very well judging from this blog entry from Doug Burns
I’ll try to find a public link to the presentation, but the critcal point is this. The Change Tracking log (produced by CTWR) is a bitmap representing the entire database – (probably) using one bit for each 32KB chunk of the database. The bitmap has an associated SCN, which is the SCN as at the last backup, and a bit gets set in the bitmap to show that the corresponding chunk (32KB) of the database has changed since that SCN.
There are 7 versions of the bitmap; and each time you take a backup of the database using rman, you starting using the next available bitmap and stamp it with the latest backup SCN. So if you take 8 backups, of the database the first bitmap has to be overwritten.
But the point of the Change Tracking log is that rman can read the backup to determine which blocks need to backed up, and avoid scanning entire data files to check the SCN (System Change Number) of every block; so if a bitmap simply disappears, rman can no longer identify all of the blocks that have changed since that early backup.
This doesn’t really seem to matter – until you realise that rman allows you to implement different “levels” of backups, and then choose to do incremental or cumulative backups. The upshot of this limit of seven bitmaps is that if you do eight incremental backups in a row, then the next cumulative backup will have lost some information about the last cumulative backup – so you may find your backup process scanning entire files when you thought it was going to use the change tracking log to do some high precision block selection.
Moral: think very carefully about how you sequence the different backup options through rman. And thank you, Alex, of the Pythian Group, for investigating what goes into the log.
Footnote: As Alex made clear during his presentation – this investigation is an ongoing activity. There may be extra features and details that will be revealed with further work. But I’d rather be over-cautious now, rather than have a nasty surprise when I least expect it.