RAC Archive log写入错误的节点


由于多个客户几次问到,RAC环境中,node2的归档日志,写入到node1的archive路径中。

这个问题导致一些客户在使用OGG的情况下,有时无法正确读取日志的问题。

那是什么原因导致的这个问题呢?

对此,进行查找和测试。发现了下面的情况会导致archive log没有记录到正确的节点位置。

测试环境

Linux + 11.2.0.4 RAC

node1

ALTER SYSTEM SET log_archive_dest_1='location=/home/Oracle/archive_log/ valid_for=(all_logfiles,all_roles)' sid='orcl1' scope=spfile;

node2

ALTER SYSTEM SET log_archive_dest_1='location=/home/oracle/archive_log/ valid_for=(all_logfiles,all_roles)' sid='orcl2' scope=spfile;

情况1

在node2 instance关闭的情况下,node1上执行alter system archive log current;

会将node2的archive log写入到node1的路径

-----------10.2.0.5版本测试--------------

注:nascds14是节点1,nascds15是节点2


[oracle@nascds14 ~]$ ls -l /u01/app/database/dbs/
-rw-r----- 1 oracle oinstall 9897472 Dec  1 09:47 arch1_66_827745338.dbf
-rw-r----- 1 oracle oinstall    2048 Dec  1 09:47 arch1_67_827745338.dbf
-rw-r----- 1 oracle oinstall    1024 Dec  1 09:50 arch1_68_827745338.dbf
[oracle@nascds14 ~]$ sqlplus / as sysdba
SQL>  alter system archive log current;
System altered.
[oracle@nascds14 ~]$ ls -l /u01/app/database/dbs/
-rw-r----- 1 oracle oinstall 9897472 Dec  1 09:47 arch1_66_827745338.dbf
-rw-r----- 1 oracle oinstall    2048 Dec  1 09:47 arch1_67_827745338.dbf
-rw-r----- 1 oracle oinstall    1024 Dec  1 09:50 arch1_68_827745338.dbf
-rw-r----- 1 oracle oinstall  11776 Dec  1 09:55 arch1_69_827745338.dbf
-rw-r----- 1 oracle oinstall  128512 Dec  1 09:55 arch2_101_827745338.dbf    <<<<<<<<<<<<<<node2的日志,产生在node1上
[oracle@nascds14 ~]$ date
Mon Dec  1 09:56:01 CST 2014
$ sqlplus / as sysdba
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
[oracle@nascds15 ~]$ ls -l /u01/app/database/dbs/
-rw-r----- 1 oracle oinstall    6144 Dec  1 09:50 arch2_100_827745338.dbf
-rw-r----- 1 oracle oinstall 17412608 Dec  1 09:46 arch2_98_827745338.dbf
-rw-r----- 1 oracle oinstall    1536 Dec  1 09:47 arch2_99_827745338.dbf
[oracle@nascds15 ~]$ ls -l /u01/app/database/dbs/
-rw-r----- 1 oracle oinstall    6144 Dec  1 09:50 arch2_100_827745338.dbf
-rw-r----- 1 oracle oinstall 17412608 Dec  1 09:46 arch2_98_827745338.dbf
-rw-r----- 1 oracle oinstall    1536 Dec  1 09:47 arch2_99_827745338.dbf

-----------11.2.0.4版本测试--------------

node2 instance关闭,日志产生结果

在node2 instance关闭的情况下,node1上执行alter system archive log current;

同样会将node2的archive log写入到node1的路径

---node2---

SQL> create table test1 as select * from dba_users;

create table test1 as select * from dba_users;

SQL> shutdown abort

shutdown abort

ORACLE instance shut down.

---node1---

SQL> alter system archive log current;

---node1---

[oracle@node111g archive_log]$ ls -al 2*

-rw------- 1 oracle asmadmin 148992 12月 19 11:22 2_176_864642458.dbf

-rw------- 1 oracle asmadmin 1024 12月 19 11:22 2_177_864642458.dbf <<<<<<<<<<<<<<node2的日志,产生在node1上

---node2---

[oracle@node211g archive_log]$ ls -ctrl

-rw------- 1 oracle asmadmin 1024 12月 19 10:44 2_173_864642458.dbf

-rw------- 1 oracle asmadmin 1872896 12月 19 11:18 2_174_864642458.dbf

-rw------- 1 oracle asmadmin 15360 12月 19 11:18 2_175_864642458.dbf

下面是测试结果截图,同时开启4个窗口

RAC Archive log写入错误的节点

更多详情见请继续阅读下一页的精彩内容:

  • 1
  • 2
  • 下一页

相关内容