I. Functions of redo log files:
1. Record all data changes
2. Provide a recovery mechanism
3. group-based Management (there are at least two groups. The default value is 3. Each group has one redo log file. Oracle officially recommends that the size of all redo log files in each group be the same; of course, when adding members to the redo log file group, the size cannot be specified because each redo log file is redundant and must be consistent)
Ii. Redo Log File status
Write data to a log file through lgwr
When the log group 1 is full, it will switch to the log group 2, and then to 3; 3 and then to 1 for reuse. Log groups do not stop working.
Redo log files are generally in four States (or in six states)
1. unused: indicates that this redo log file group has not been used
2. current: indicates the current redo log group. lgwr is writing
3. active: indicates that the data block changes caused by the transactions recorded in the redo log file group have not been completely written from the buffer zone to the data file, the redo log file group is in this status and cannot be overwritten. Once the write is completed, it becomes inactive.
4. inactive: indicates the change of the data block caused by the transaction recorded in the redo log file group, which has been written from the buffer to the data file. This status can be overwritten.
The above 4 states are common statuses of redo log files. The following two States are the statuses when the redo log group is damaged or in special circumstances.
5. clearing: indicates that the redo log file is being rebuilt (the status changes to unused after reconstruction)
6. clearing_cyrrent: indicates that the redo log file reconstruction is incorrect.