Oracle Redo Redo Log Files

Source: Internet
Author: User

The following astriddesmet are translated from the Oracle DBA official documentation, which is also noted in the gaps.

Managing Redo Log Files

Learning Goals:
1. Explaining the purpose of redo log files
2. Describe the structure of the redo log file
3. Learn to control log switching and checkpoints
4. Diversified management redo log files
5. Using OMF to manage redo log files


1. Concept Introduction:
Redo log files provide a recovery mechanism for system or media failure by recording all changes to the data.
1) Redo log file exists as a group
2) An Oracle database requires at least two groups with at least one file per group
3) Each redo log file in a group is called a member
The Redo log files is used only for recovery.

2. Redo the log file structure:

1) Redo log file group
A. A set of identical copies online redo log files are referred to as an online redo log group.
All redo log files in the B.LGWR process concurrently write the same information
2) Redo log file
A. Each member of a group is used for the same log sequence numbers and the same size
B. Assigning a log sequence number to uniquely identify each redo log file each time the Oracle server begins to write to the log group
C. The current log sequence number is stored in the header of the control file and all data files

3. How does redo log work?

1) Redo logs are used in a circular manner
2) When a redo log file is full, the LGWR process moves to the next log group
A. This step is called log switch
B.checkpoint occurs at this time
C. Information is written to the control file
3) The following conditions will trigger the LGWR process write operation:
A. When a COMMIT transaction occurs
B. When the redo log buffer storage reaches 1/3
c. When the redo log buffer has more than one megabyte of change records
D. Before Dbwn writes information about the data block modified by buffer cache to the data file

4) Check point occurs in the following cases:
A. Each time the log is switched
B. When the instance is closed via the normal,transactional,immediate option
C. Forcing occurs by setting initialization parameters Fast_start_mttr_target
D. The database administrator manually set the ALTER SYSTEM CHECKPOINT, ALTER Tablespace, datafile offline
E. Using alter Tablespace[offline normal| READ only| BEGIN BACKUP] statement causes a checkpoint to occur for the specified data file.

Note: If the parameter Log_checkpoints_to_alert is set to True, each checkpoint information is recorded in the Alert_sid.log file.

4. How do I add and delete redo log files (groups)?

A. Add Redo log file groups:
ALTER DATABASE ADD LOGFILE GROUP 3 (' $HOME/oradata/u01/log3a.rdo ',
' $HOME/oradata/u02/log3b.rdo ') SIZE 1M;

B. Add Redo log files:
ALTER DATABASE ADD LOGFILE MEMBER
' $HOME/oradata/u04/log1c.rdo ' to GROUP 1,
' $HOME/oradata/u04/log2c.rdo ' to GROUP 2,
' $HOME/oradata/u04/log3c.rdo ' to GROUP 3;

C. Delete the Redo log file group:
ALTER DATABASE DROP LOGFILE GROUP 3;

d. Delete Redo log files:
ALTER DATABASE DROP LOGFILE MEMBER ' $HOME/oradata/u04/log3c.rdo ';

5. Clean, redistribute, or rename redo log files?

A. Cleanup redo log files
ALTER DATABASE CLEAR LOGFILE ' $HOME/oradata/u01/log2a.rdo ';

B. Redistribute or rename redo log files
New log file implementation is added by deleting old log files.


6. How do I get Oracle database log group and member information?
V$log
V$logfile

To get redo log file information from the control file:
SELECT group#, sequence#, Bytes, members, status
From V$log;

Original address: http://blog.csdn.net/indexman/article/details/7746948

Oracle Redo Redo Log Files

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.