Basic knowledge of Oracle redolog File

Source: Internet
Author: User

1 redo. LogIs a relatively large binary file. Stores the database operation records that the user executes. It can be used when the database suffers an abnormal power failure.RedologThere must be at least two groups for data recovery.

 

2ForRedologGroup (Group) And members (Member). ForGroupBelongs to the database. Each database has at least two groups of data,Control
FileThe difference is that for eachGroupThe data in a group is different. Only oneCurrent
StatusGroup. Related operations are only written to the current group. ForMember, Belongs to groupGroupThe size of each member in the same group is the same and the data is stored in the same group. For online archiving days, useMemberMultiplexing.

 

3ResponsibleRedol log BufferWrite DataRedolog FileThe process in isLgwr. This will be triggered in the following situations:

ATrigger every three seconds

BWhenRedo logbufferWhen the data volume exceeds 1/3

CWhen the data volume exceeds1 mTime

DIn executionDbwnRunLgwr

 

ForCkptExecution triggering of processes

Each timeLog Switch
TimeAlter system switch logfile

Based on the parameter valueFast_start_mttr_targetThe set value is periodically executed.

When the tablespace is mounted and detached

Manual executionAlter system checkpoint

 

 

4Add group to database

Alter database add logfile group4 ('$ oracle_base/oradata/orcl/log4.rdo') size 50 m;

 

5ToGroup4
Add group membersMember

Alter database add logfile member '$ oracle_base/oradata/orcl/log4b. rdo' to group4;

 

6Delete Group members

Alter database drop logfile member '$ oracle_base/oradata/orcl/log4b. rdo ';

Delete Group

Alter database drop logfile group4;

When deleting a file, you must note that this file is only logically deleted. If you delete it permanently, you must use the operating system command to delete it.

ForCurrent,ActiveStatusGroup,MemberIf it cannot be deleted, run the following command:
Alter System

Switch logfile

If there is only one database groupMemberWe cannot deleteMember, Can only be deletedGroup

 

7Common views and commands

 

Select * from V $ logfile

 

Select group #, thread #, sequence #, status fromv $ log;

 

Alter system switch logfile

Alter system checkpoint

Show parameter fast_start_mttr_target

Alter database add logfile group 6 ('$ oracle_base/oradata/orcl/log4b. rdo') size 50 m

Alter database add logfile member '$ oracle_base/oradata/orcl/log4b. rdo' to group 6

 

Alter database rename File

'$ Oracle_base/oradata/orcl/log4b. rdo' to '$ oracle_base/oradata/orcl/log4b2. rdo ';

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.