11g Rac 添加日志组

时间:2022-05-26 08:47:44
SQL> select  GROUP# , THREAD#, MEMBERS,status from v$log;

GROUP# THREAD# MEMBERS STATUS
---------- ---------- ---------- ----------------
1 2 1 CURRENT
2 2 1 INACTIVE
5 1 1 CURRENT
6 1 1 INACTIVE
7 1 1 INACTIVE
8 2 1 INACTIVE


SQL> select GROUP# , status,member from v$logfile;

GROUP# STATUS MEMBER
---------- ------- ------------------------------
1 +DATA/devrac/onlinelog/redo_2_
01.log

2 +DATA/devrac/onlinelog/redo_2_
02.log

5 +DATA/devrac/onlinelog/redo_1_
01.log

6 +DATA/devrac/onlinelog/redo_1_
02.log

GROUP# STATUS MEMBER
---------- ------- ------------------------------

7 +DATA/devrac/onlinelog/redo_1_
03.log

8 +DATA/devrac/onlinelog/redo_2_
03.log


6 rows selected.

添加日志组:
SQL> alter database add logfile '+DATA/devrac/onlinelog/redo_1_04.log' size 500M;



SQL> select GROUP# , THREAD#, MEMBERS,status from v$log;

GROUP# THREAD# MEMBERS STATUS
---------- ---------- ---------- ----------------
1 2 1 CURRENT
2 2 1 INACTIVE
3 1 1 UNUSED
5 1 1 CURRENT
6 1 1 INACTIVE
7 1 1 INACTIVE
8 2 1 INACTIVE

7 rows selected.



SQL> select GROUP# , status,member from v$logfile;

GROUP# STATUS MEMBER
---------- ------- ------------------------------
1 +DATA/devrac/onlinelog/redo_2_
01.log

2 +DATA/devrac/onlinelog/redo_2_
02.log

5 +DATA/devrac/onlinelog/redo_1_
01.log

6 +DATA/devrac/onlinelog/redo_1_
02.log

GROUP# STATUS MEMBER
---------- ------- ------------------------------

7 +DATA/devrac/onlinelog/redo_1_
03.log

8 +DATA/devrac/onlinelog/redo_2_
03.log

3 +DATA/devrac/onlinelog/redo_1_
04.log


7 rows selected.

多出了3号日志组: 日志文件为+DATA/devrac/onlinelog/redo_1_01.log


给第2个节点加日志组:
SQL> alter database add logfile thread 2 '+DATA/devrac/onlinelog/redo_2_04.log' size 500M;

SQL> select GROUP# , THREAD#, MEMBERS,status from v$log;

GROUP# THREAD# MEMBERS STATUS
---------- ---------- ---------- ----------------
1 2 1 CURRENT
2 2 1 INACTIVE
3 1 1 UNUSED
4 2 1 UNUSED
5 1 1 CURRENT
6 1 1 INACTIVE
7 1 1 INACTIVE
8 2 1 INACTIVE

8 rows selected.

SQL> select GROUP# , status,member from v$logfile;

GROUP# STATUS MEMBER
---------- ------- ------------------------------
1 +DATA/devrac/onlinelog/redo_2_
01.log

2 +DATA/devrac/onlinelog/redo_2_
02.log

5 +DATA/devrac/onlinelog/redo_1_
01.log

6 +DATA/devrac/onlinelog/redo_1_
02.log

GROUP# STATUS MEMBER
---------- ------- ------------------------------

7 +DATA/devrac/onlinelog/redo_1_
03.log

8 +DATA/devrac/onlinelog/redo_2_
03.log

3 +DATA/devrac/onlinelog/redo_1_
04.log

4 +DATA/devrac/onlinelog/redo_2_

GROUP# STATUS MEMBER
---------- ------- ------------------------------
04.log


8 rows selected.