In today’s article we will be learning how to add a Redo Log Group in oracle database.
Groups, members and dimensions should be checked before adding a new group.
1 2 3 4 5 6 7 | SQL> select group#, members, bytes/1024/1024 MB, status from v$log; GROUP# MEMBERS MB STATUS ---------- ---------- ---------- ---------------- 1 1 50 CURRENT 2 1 50 UNUSED 3 1 50 INACTIVE |
We add a new group as follows.
1 2 3 | SQL> alter database add logfile group 4 ('/u01/app/oracle/oradata/traindb/redo04.log') size 50M; Database altered. |
The added group is queried.
1 2 3 4 5 6 7 8 | SQL> select group#, members, bytes/1024/1024 MB, status from v$log; GROUP# MEMBERS MB STATUS ---------- ---------- ---------- ---------------- 1 1 50 CURRENT 2 1 50 UNUSED 3 1 50 INACTIVE 4 1 50 UNUSED |
A new group and member is added as follows.
1 2 3 | SQL> alter database add logfile group 5 ('/u01/app/oracle/oradata/traindb/redo05a.log','/u01/app/oracle/oradata/traindb/redo04b.log') size 50M; Database altered. |
The added group and member are queried.
1 2 3 4 5 6 7 8 9 | SQL> select group#, members, bytes/1024/1024 MB, status from v$log; GROUP# MEMBERS MB STATUS ---------- ---------- ---------- ---------------- 1 1 50 CURRENT 2 1 50 UNUSED 3 1 50 INACTIVE 4 1 50 UNUSED 5 2 50 UNUSED |
Important notes:
When adding a redo log group, it is recommended that the size to be added be the same as the other redo log groups.
It is also recommended that the number of members in the redo log group be the same.
If the above values are not met, the performance evaluations are calculated incorrectly.