P. 1
Instance Recovery

Instance Recovery

|Views: 4|Likes:
Published by Ramp Kalapati

More info:

Published by: Ramp Kalapati on Sep 09, 2011
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less





Phases of Instance Recovery ____________________________

In order for an instance to open a data file, the system change number (SCN) con tained within the data fileâ s header must match the current SCN stored in the databaseâ s control file . If the numbers do not match, the instance applies redo from the online redo logs , sequentially â redoingâ transactions until the data files are up-to-date. After all data files have b en synchronized with the control files, the database is opened and users may now lo g in. When redo was applied, all transactions were applied to bring the database up to the state as of the time of failure. This usually includes transactions that were in progress bu t had not yet been committed. After the database has been opened, those uncommitted transactions ar e rolled back. At the end of the rollback phase of instance recovery, the data files will conta in only committed data. Tuning Instance Recovery ___________________________ â ¢ During instance recovery the transactions between the checkpoint position and end of redo log must be applied to the data files. â ¢ Tune instance recovery by controlling the difference between the checkpoint position and end of redo log. Checkpoint position End of redo log ' ' '<------instance recovery-------->' ' ' [][][][][][][][][][][][][][][][][][][][][] -----------transactions-------->> Transaction information is always recorded in redo log groups before the instanc e returns commit complete for transaction. The information in the redo log groups guarantees that the transaction can be re covered in case of a failure. That same transaction information also needs to be written to the data file. The data file write usually happens sometime after the information is recorded i n the redo log groups because the data file write process is much slower than th e redo writes (random writes for data files are slower than serial writes for re do log files). To keep track of what has already been written to the data files, the database u ses checkpoints. A checkpoint guarantees that as of the time the checkpoint occurs, all data up t o a certain SCN is recorded in the data file. Transactions after the checkpoint position may or may not have yet been written to the appropriate data file. In the graphic above, the striped blocks have not yet been written to disk. The time required for instance recovery is the time required to bring the data f iles from their last checkpoint to the latest SCN recorded in the control file.

. The distance between the checkpoint position and the end of the redo log group c an never be more than 90% of the smallest redo log group.The administrator controls that time by setting a MTTR target (in seconds) and t hrough the size of the redo log groups.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->