Oracle Database logs are called redo logs. All data changes are recorded in redo logs, which can be used to repair damaged databases. Large Databases use logs. The benefits of this design are the same.
Redo logs are grouped. A database must have at least two groups. By default, there are three groups. The redo logs in each group are called members. By default, each group has only one member, which is not redundant and may cause loss of online redo logs. To improve data reliability, you should configure at least two members for the two groups, allocate the two members to different disks.
Redo logs are used in turn. When a redo log is full, LGWR switches to the next redo log group. This operation is called a log switch, which also performs checkpoint, the corresponding information is also written into the control file.
You can also manually perform log switch or checkpoint operations
SQL> alter system switch logfile;
System altered.
SQL> alter system checkpoint;
System altered.
View the redo log information of the system:
SQL> select group #, sequence #, bytes, members, status from v $ log;
GROUP # SEQUENCE # BYTES MEMBERS STATUS
--------------------------------------------------------
1 5 104857600 1 INACTIVE
2 6 104857600 1 INACTIVE
3 7 104857600 1 CURRENT
SQL> select member from v $ logfile;
MEMBER
---------------------
/Home/oracle/oradata/gldb/redo03.log
/Home/oracle/oradata/gldb/redo02.log
/Home/oracle/oradata/gldb/redo01.log
You can add online redo log groups online:
SQL> alter database add logfile group 4 ('/home/oracle/oradata/gldb/redo04.log') size 1 m;
Database altered.
SQL> select member from v $ logfile;
MEMBER
------------------------------------
/Home/oracle/oradata/gldb/redo03.log
/Home/oracle/oradata/gldb/redo02.log
/Home/oracle/oradata/gldb/redo01.log
/Home/oracle/oradata/gldb/redo04.log
| [Content navigation] |
| Page 1st: Oracle Database log redo log |
Page 2nd: Oracle Database log redo log |