Oracle redo log file first recognized

Source: Internet
Author: User

The following documents are easy to translate from the official Oracle dba documents.

Manage redo log files

Objective:
1. Explain the purpose of redoing log files
2. describe the structure of the redo log file
3. Learn to control log switching and checkpoints
4. Diversified Management of redo log files
5. Use OMF to manage redo log files

1. concepts:
Redo log files provide a recovery mechanism for system or media faults by recording all changes to the data.
1) redo log files exist as groups
2) an oracle database must have at least two groups of files in each group.
3) Each log file in a group is called a member.
The redo log files are used only for recovery.

2. Redo the log file structure:

1) redo log file group
A. a group of identical online redo log files is called an online redo log group.
B. The LGWR process concurrently writes the same information to all redo log files in the log group.
2) redo log files
A. each member of a group is used for the same log sequence numbers and the same size.
B. Each time the oracle server starts writing data to a log group, the log serial number is assigned to uniquely identify each redo log file.
C. The current log serial number is stored in the header of the control file and all data files.

3. How does the redo log work?

1) Redo logs to be used cyclically
2) When a redo log file is full, the LGWR process will move to the next log group.
A. This step is called log switch.
B. checkpoint occurs at this time
C. The information is written to the control file.
3) The LGWR process write operation will be triggered in the following cases:
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 1 MB of change records
D. Before DBWn writes the information of the data block modified by the buffer cache to the data file

4) check point occurs in the following situations:
A. Each log Switch
B. When the instance is disabled using the normal, transactional, and immediate options
C. Set the initialization parameter FAST_START_MTTR_TARGET to force it to happen.
D. The database administrator manually sets alter system checkpoint, alter tablespace, and datafile offline.
E. Use the alter tablespace [offline normal | read only | begin backup] statement to cause a checkpoint for the specified data file.

Note: If the LOG_CHECKPOINTS_TO_ALERT parameter is set to true, the checkpoint information is recorded in the alert_SID.log file.

4. How to add or delete redo log files (groups )?

A. added the redo log file group:
Alter database add logfile group 3 ('$ HOME/ORADATA/u01/log3a. rdo ',
'$ HOME/ORADATA/u02/log3b. rdo') SIZE 1 M;

B. Add the redo log file:
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 the redo log file:
Alter database drop logfile member '$ HOME/ORADATA/u04/log3c. rdo ';

5. Clean up, re-distribute or rename the redo log file?

A. Clear the redo log file
Alter database clear logfile '$ HOME/ORADATA/u01/log2a. rdo ';

B. Redistribution or rename the redo log file
Delete the old log file to add a new log file.


6. How can I obtain information about oracle Database Log groups and Members?
△V $ LOG
△V $ LOGFILE

Obtain the redo log file information from the control file:
SELECT group #, sequence #, bytes, members, status
FROM v $ log;


7. For detailed statements, see the following:

  • 1
  • 2
  • Next Page

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.