奇怪的RAC归档,求解!

[复制链接]
查看11 | 回复9 | 2013-1-30 22:13:19 | 显示全部楼层 |阅读模式
数据库:10.2.0.1
二节点RAC,INSTANCE:RACDB1,RACDB2
关闭RACDB2后,手动切换RACDB1的日志,为什么会产生RACDB2的归档?很奇怪,求解!
手动切换:ALTER SYSTEM SWITCH LOGFILE;
也查看过ps -ef|grep oracle,确实没开启RACDB2的实例。

实例情况:
SQL> SELECT STATUS,INSTANCE FROM V$THREAD;
STATUS
------
INSTANCE
--------------------------------------------------------------------------------
OPEN
RACDB1
CLOSED
RACDB2


归档记录:
ASMCMD> ls
thread_1_seq_41.300.795007331
thread_1_seq_42.299.795007425
thread_1_seq_43.297.795007427
thread_1_seq_44.296.795007433
thread_1_seq_45.294.795007517
thread_1_seq_46.295.795007519
thread_1_seq_47.292.795007525
thread_2_seq_20.298.795007427
thread_2_seq_21.293.795007519
thread_2_seq_22.291.795007527
ASMCMD> ls
thread_1_seq_41.300.795007331
thread_1_seq_42.299.795007425
thread_1_seq_43.297.795007427
thread_1_seq_44.296.795007433
thread_1_seq_45.294.795007517
thread_1_seq_46.295.795007519
thread_1_seq_47.292.795007525
thread_1_seq_48.289.795007545
thread_1_seq_49.287.795007545
thread_1_seq_50.285.795007551
thread_1_seq_51.286.795007555
thread_2_seq_20.298.795007427
thread_2_seq_21.293.795007519
thread_2_seq_22.291.795007527
thread_2_seq_23.288.795007547
thread_2_seq_24.284.795007555
ASMCMD> pwd
+rac_disk/racdb/archivelog/2012_09_26

回复

使用道具 举报

千问 | 2013-1-30 22:13:19 | 显示全部楼层
学习了
回复

使用道具 举报

千问 | 2013-1-30 22:13:19 | 显示全部楼层
学习了
回复

使用道具 举报

千问 | 2013-1-30 22:13:19 | 显示全部楼层
tanjiaping 发表于 2012-9-25 23:05
学习了

期待高人!
回复

使用道具 举报

千问 | 2013-1-30 22:13:19 | 显示全部楼层
Can this be reproduced? Can you show us the exact commands and output (text, not image)? Like the following:
select instance_name from v$instance;
select thread#, status, enabled, instance from v$thread;
select max(sequence#) from v$archived_log where thread# = 2; -- assuming instance 2 runs thread 2
select group#, thread#, sequence#, status from v$log;
alter system switch logfile;
select max(sequence#) from v$archived_log where thread# = 2;
select group#, thread#, sequence#, status from v$log;

回复

使用道具 举报

千问 | 2013-1-30 22:13:19 | 显示全部楼层
节点2的归档不是由节点2产生的,是由节点上的Thead 2产生的。
节点2关闭后,Thread 2就接管了原本在节点2上的Redo,但节点2上的Redo将不再包含任何内容。
不过,RAC要求节点1的所有Redo使用一圈后,节点2一定也要切换一次,这次切换,就由节点1上的Thread 2完成。
这是我大概的理解,没做实验验证。
回复

使用道具 举报

千问 | 2013-1-30 22:13:19 | 显示全部楼层
Yong Huang 发表于 2012-9-26 02:08
Can this be reproduced? Can you show us the exact commands and output (text, not image)? Like the fo ...

如下是在RACDB1环境下运行的:

SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
RACDB1
SQL> select thread#, status, enabled, instance from v$thread;
THREAD# STATUS ENABLEDINSTANCE
---------- ------ -------- ------------------------------
1 OPEN PUBLIC RACDB1
2 CLOSED PUBLIC RACDB2
SQL> select max(sequence#) from v$archived_log where thread# = 2;
MAX(SEQUENCE#)
--------------

23
SQL> select group#, thread#, sequence#, status from v$log;
GROUP#THREAD#SEQUENCE# STATUS
---------- ---------- ---------- ----------------
1
1 45 INACTIVE
2
1 46 CURRENT
3
2 23 INACTIVE
4
2 24 CURRENT
SQL> alter system switch logfile;
System altered.
SQL> alter system switch logfile;
System altered.
SQL> alter system switch logfile;
System altered.
SQL> select max(sequence#) from v$archived_log where thread# = 2;
MAX(SEQUENCE#)
--------------

25
SQL> select group#, thread#, sequence#, status from v$log;
GROUP#THREAD#SEQUENCE# STATUS
---------- ---------- ---------- ----------------
1
1 49 CURRENT
2
1 48 INACTIVE
3
2 25 INACTIVE
4
2 26 CURRENT

回复

使用道具 举报

千问 | 2013-1-30 22:13:19 | 显示全部楼层
vage 发表于 2012-9-26 08:44
节点2的归档不是由节点2产生的,是由节点上的Thead 2产生的。
节点2关闭后,Thread 2就接管了原本在节点2上 ...

确实是节点1的REDO使用一圈,节点2才切换一次。
谢谢vage,学些了!
回复

使用道具 举报

千问 | 2013-1-30 22:13:19 | 显示全部楼层
vage 发表于 2012-9-26 08:44
节点2的归档不是由节点2产生的,是由节点上的Thead 2产生的。
节点2关闭后,Thread 2就接管了原本在节点2上 ...


V哥威武
回复

使用道具 举报

千问 | 2013-1-30 22:13:19 | 显示全部楼层
Kevin__Zhang 发表于 2012-9-26 10:57
V哥威武

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行