Thursday, August 25, 2011

Redo generation in backup mode

When a user managed Hot backup is executed, the tablespace or database has to be placed in backup mode. This informs the Oracle kernel that SCNs should not be updated on the datafile. i.e. the header is frozen until the end backup statement is executed. During this period the datafiles will be updated but not the SCNs in the header. 

Why so much redo is generated?


As per Tom:


When you place a tablespace in hot backup mode, oracle will log extra information for a block the first time it is modified while the tablespace it belongs to is in hot backup mode.

Say tablespace X containing file 55 is put into hot backup mode.

You modify block 123 in file 55 -- this generates redo.  Oracle will log the ENTIRE block image instead of just changed bytes.

When you commit.

Someone else modifies blocks 123 and 124 in file 55.  Oracle will log just changed bytes for block 123 but a full block image copy for 124.


Below link would also give practical approach of this topic:


http://www.oraclealchemist.com/oracle/hot-backups-redo-and-fractured-blocks/

HTH:-)

2 comments:

Anonymous said...

The docs are misleading about this. It only copies the entire block the first time it is changed after the backup state is entered.

Vishwanath Sharma said...

Hi! Thanks for correcting.