Redo log
Encyclopedia
In the Oracle
RDBMS environment, redo logs comprise files in a proprietary format which log a history of all changes made to the database
. Each redo log file consists of redo records. A redo record, also called a redo entry, holds a group of Change vector
s, each of which describes or represents a change made to a single block in the database.
For example, if a user
Whenever something is changed on a datafile, Oracle records it in the redo log. The name redo log indicates its purpose: When the database crashes, oracle can redo all changes on datafiles which will take the database data back to the state it was when the last redo record was written. Use v$log, v$logfile, v$log_history and v$thread to find information about the redo log of your database. Each redo log file belongs to exactly one group (of which at least two must exist). Exactly one of these groups is the CURRENT group (can be queried using the column status of v$log). Oracle uses that current group to write the redo log entries. When the group is full, a log switch occurs, making another group the current one. Each log switch causes checkpoint, however, the converse is not true: a checkpoint does not cause a redo log switch. You can also manually cause a redo log switch: alter system switch logfile.
Oracle database
The Oracle Database is an object-relational database management system produced and marketed by Oracle Corporation....
RDBMS environment, redo logs comprise files in a proprietary format which log a history of all changes made to the database
Database
A database is an organized collection of data for one or more purposes, usually in digital form. The data are typically organized to model relevant aspects of reality , in a way that supports processes requiring this information...
. Each redo log file consists of redo records. A redo record, also called a redo entry, holds a group of Change vector
Change vector
Change Vector is a single change to a single data block. A change vector is the smallest unit of change recorded in the Redo log.-Source for further reading:*...
s, each of which describes or represents a change made to a single block in the database.
For example, if a user
UPDATE
s a salary-value in a table containing employee-related data, the DBMS generates a redo record containing change-vectors that describe changes to the data segment block for the table. And if the user then COMMIT
s the update, Oracle generates another redo record and assigns the change a "system change number" (SCN).Whenever something is changed on a datafile, Oracle records it in the redo log. The name redo log indicates its purpose: When the database crashes, oracle can redo all changes on datafiles which will take the database data back to the state it was when the last redo record was written. Use v$log, v$logfile, v$log_history and v$thread to find information about the redo log of your database. Each redo log file belongs to exactly one group (of which at least two must exist). Exactly one of these groups is the CURRENT group (can be queried using the column status of v$log). Oracle uses that current group to write the redo log entries. When the group is full, a log switch occurs, making another group the current one. Each log switch causes checkpoint, however, the converse is not true: a checkpoint does not cause a redo log switch. You can also manually cause a redo log switch: alter system switch logfile.