Sunday, July 14, 2013

Redo Logs Files And Control Files Activity.

Redo Logs:- Redo logs record all changes made to a database's data files. Each time data is changed in the database, that change is recorded in the online redo log first, before it is applied to the data files. An Oracle database requires at least two online redo log groups , and in each group there is at least one online redo log member , an individual redo log file where the changes are recorded. At intervals, the database rotates through the online redo log groups, storing changes in the current online redo log.

Control Files:-  The control file contains the record of the ph ysical structures of the database and their status. Several types of information stored in the control file are related to backup and recovery:

1. Database information (RESETLOGS SCN and time stamp)
2. Tablespace and datafile records (filenames, datafile checkpoints, read/write status, offline ranges)
3. Information about redo threads (current online redo log)
4. Log records (log sequence numbers, SCN range in each log)
5. A record of past RMAN backups
6. Information about corrupt datafile blocks


Undo Segments:- In general, when data in a datafile is upda ted, "before images" of that data are written into undo segments . If a transaction is rolled back, this undo information can be used to restore the original datafile contents. In the context of recovery, the undo information is used to undo the effects of uncommitted transactions, once all the datafile changes from the redo logs have been applied to the datafiles. The database is actually opened before the undo is applied.

No comments:

Post a Comment