Saturday, July 28, 2012

"Begin backup mode" background process

Whenever I put tablspace in backup mode it perform the below steps in details…..
1. Oracle checkpoints the tablespace, flushing all changes from shared memory to disk.
2. The SCN markes for each datafile in that tablespace are “frozen” at their current values. Even though further updates will be sent to the datafiles, the SCN markers will not be updated until the tablespace is taken out of backup mode.
3. Oracle switches to logging full images of changed database blocks to the redologs. Instead of recording how it changed a particular block the change vector), it will log the entire image of the block after he change. This is why the redologs grow at a much faster rate while hot backups are going on.

After this, your backup program works happily through this datafile, backing it up block by block. Since the file is being updated as you are reading it, it may read blocks just before they’re changed, after they’re changed, or even while they’re changing. Suppose that your filesystem block size is 4 KB, and Oracle’s block size is 8 KB. Your backup program will be reading in increments of 4 KB. It could back up the first 4 KB of an 8-KB Oracle data block before a change is made to that block, then back up the last 4 KB of that file after a change has been made. This results in what Oracle calls a “split block”. However, when your backup program reaches the point of the datafile that contains the SCN, it will back up that block the way it looked when the backup began, since that block is frozen. Once you take the tablespace out of backup mode, the SCN marker is advanced to the current value, and Oracle switches back to logging change vectors instead of full images of changed blocks.