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 ';