archive log文件大小与redo log文件大小关系探究(2)

THREAD#                            NAME                                          size

---------- ---------------------------------------------------------------------- ----------

1      +DATADG01/gyl/archivelog/2014_10_23/thread_1_seq_10.268.861729569    1.4453125

1      +DATADG01/gyl/archivelog/2014_10_23/thread_1_seq_11.270.861730475    49.9980469

1      +DATADG01/gyl/archivelog/2014_10_23/thread_1_seq_12.271.861730509    49.9980469

1      +DATADG01/gyl/archivelog/2014_10_23/thread_1_seq_13.272.861730545    49.9980469

1      +DATADG01/gyl/archivelog/2014_10_23/thread_1_seq_14.274.861730573    49.9980469

1      +DATADG01/gyl/archivelog/2014_10_23/thread_1_seq_15.275.861730601    49.9980469

1      +DATADG01/gyl/archivelog/2014_10_24/thread_1_seq_16.276.861788401    35.8242188

1      +DATADG01/gyl/archivelog/2014_10_24/thread_1_seq_17.278.861791005    49.9980469

1      +DATADG01/gyl/archivelog/2014_10_24/thread_1_seq_18.279.861791039    49.9980469

1      +DATADG01/gyl/archivelog/2014_10_24/thread_1_seq_19.281.861791071    49.9980469

1      +DATADG01/gyl/archivelog/2014_10_24/thread_1_seq_20.282.861791091    49.9980469

1      +DATADG01/gyl/archivelog/2014_10_24/thread_1_seq_21.283.861791119    49.9980469

2      +DATADG01/gyl/archivelog/2014_10_23/thread_2_seq_2.269.861729571    2.37207031

2      +DATADG01/gyl/archivelog/2014_10_23/thread_2_seq_3.273.861730551    .008300781

2      +DATADG01/gyl/archivelog/2014_10_24/thread_2_seq_4.277.861788403    .567871094

2      +DATADG01/gyl/archivelog/2014_10_24/thread_2_seq_5.280.861791047    .791503906

2      +DATADG01/gyl/archivelog/2014_10_24/thread_2_seq_6.284.861791125    .000976563

(thread_1_seq_17至thread_1_seq_21为insert过程中节点1产生的归档,大小都接近redo file大小,thread_2_seq_5和thread_2_seq_6为节点2产生的归档,远小于redo file大小)

SQL> select GROUP#,THREAD#,SEQUENCE#,STATUS,FIRST_CHANGE# from v$log order by 2;

GROUP#      THREAD#  SEQUENCE#      STATUS      FIRST_CHANGE#

---------- ---------- ---------- ---------------- -------------

1          1        21          ACTIVE        1206256

2          1        22          CURRENT        1308608

3          2        7          CURRENT        1338258

4          2        6          INACTIVE      1014874

(可以看到,节点2的FIRST_CHANGE#也跟进了,这里还超过了节点1的)     
    再考虑一种极端情况,如果节点2已经down了,那么,节点2的归档将会由节点1进行代为执行,同样会推进节点2的redo log的FIRST_CHANGE#,继续上面的实验: 

--关闭节点2
 
SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

--继续在节点1插入数据

begin

for i in 1..500000 loop

insert into darren values(1,'aa');

commit;

end loop;

end;

--查看归档情况和redo log 的FRIST_CHANGE#

SQL> select thread#,ARCHIVAL_THREAD#,name,blocks*block_size/1024/1024 "size" from v$archived_log order by 1,2;

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/4d6bf6cdfded1b075608d1dae5b00ee0.html