本帖最后由 二两三钱 于 2013-11-30 12:13 编辑
我刚刚查了一下,确实是因为SEQUENCE#的顺序的原因,受教了...
,另外我对于这个归档顺序我也做了实验,我添加了2个日志组,看情况,归档顺序应该不影响数据库吧。
SQL> select GROUP#,SEQUENCE#,MEMBERS,BYTES,STATUS from v$log;
GROUP# SEQUENCE# MEMBERS BYTES STATUS
---------- ---------- ---------- ---------- ----------------
1 8 1 52428800 CURRENT
2 7 1 52428800 INACTIVE
3 6 1 52428800 INACTIVE
SQL> alter database add logfile '/u01/app/oracle/oradata/test1/redo04.log' size 50M;
Database altered.
SQL> select GROUP#,SEQUENCE#,MEMBERS,BYTES,STATUS from v$log;
GROUP# SEQUENCE# MEMBERS BYTES STATUS
---------- ---------- ---------- ---------- ----------------
1 8 1 52428800 CURRENT
2 7 1 52428800 INACTIVE
3 6 1 52428800 INACTIVE
4 0 1 52428800 UNUSED
SQL> alter system switch logfile;
System altered.
SQL> select GROUP#,SEQUENCE#,MEMBERS,BYTES,STATUS from v$log;
GROUP# SEQUENCE# MEMBERS BYTES STATUS
---------- ---------- ---------- ---------- ----------------
1 8 1 52428800 ACTIVE
2 7 1 52428800 INACTIVE
3 6 1 52428800 INACTIVE
4 9 1 52428800 CURRENT
SQL> alter system switch logfile;
System altered.
SQL> select GROUP#,SEQUENCE#,MEMBERS,BYTES,STATUS from v$log;
GROUP# SEQUENCE# MEMBERS BYTES STATUS
---------- ---------- ---------- ---------- ----------------
1 8 1 52428800 ACTIVE
2 7 1 52428800 INACTIVE
3 10 1 52428800 CURRENT
4 9 1 52428800 ACTIVE
SQL> alter database add logfile '/u01/app/oracle/oradata/test1/redo05.log' size 50M;
Database altered.
SQL> select GROUP#,SEQUENCE#,MEMBERS,BYTES,STATUS from v$log;
GROUP# SEQUENCE# MEMBERS BYTES STATUS
---------- ---------- ---------- ---------- ----------------
1 8 1 52428800 ACTIVE
2 7 1 52428800 INACTIVE
3 10 1 52428800 CURRENT
4 9 1 52428800 ACTIVE
5 0 1 52428800 UNUSED
SQL> alter system switch logfile;
System altered.
SQL> select GROUP#,SEQUENCE#,MEMBERS,BYTES,STATUS from v$log;
GROUP# SEQUENCE# MEMBERS BYTES STATUS
---------- ---------- ---------- ---------- ----------------
1 8 1 52428800 INACTIVE
2 7 1 52428800 INACTIVE
3 10 1 52428800 ACTIVE
4 9 1 52428800 ACTIVE
5 11 1 52428800 CURRENT
SQL> alter system switch logfile;
System altered.
SQL> select GROUP#,SEQUENCE#,MEMBERS,BYTES,STATUS from v$log;
GROUP# SEQUENCE# MEMBERS BYTES STATUS
---------- ---------- ---------- ---------- ----------------
1 8 1 52428800 INACTIVE
2 12 1 52428800 CURRENT
3 10 1 52428800 ACTIVE
4 9 1 52428800 ACTIVE
5 11 1 52428800 ACTIVE