最近搞一个oracle rac系统,在检查 alertSID.log 的时候,
OS : solaris 10
oracle : 10G RAC
归档模式
发现无法及时写日志,同时切换也太频繁了. 10秒就能切一次.太夸张了. :
node 1 :
Thread 1 cannot allocate new log, sequence 874
All online logs needed archiving
Current log# 1 seq# 873 mem# 0: /hapdb/redodata/sdh/redo1.log
Current log# 1 seq# 873 mem# 1: /hapdb/redodata/sdh/redo1_1.log
Fri Apr 23 15:33:37 2010
ARCH: Archival stopped, error occurred. Will continue retrying
Tue Apr 27 20:37:50 2010
Thread 1 advanced to log sequence 1001 (LGWR switch)
Current log# 1 seq# 1001 mem# 0: /hapdb/redodata/sdh/redo1.log
Current log# 1 seq# 1001 mem# 1: /hapdb/redodata/sdh/redo1_1.log
Tue Apr 27 20:37:58 2010
Thread 1 advanced to log sequence 1002 (LGWR switch)
Current log# 2 seq# 1002 mem# 0: /hapdb/redodata/sdh/redo2.log
Current log# 2 seq# 1002 mem# 1: /hapdb/redodata/sdh/redo2_1.log
Tue Apr 27 20:38:07 2010
Thread 1 advanced to log sequence 1003 (LGWR switch)
Current log# 3 seq# 1003 mem# 0: /hapdb/redodata/sdh/redo3.log
Current log# 3 seq# 1003 mem# 1: /hapdb/redodata/sdh/redo3_1.log
Tue Apr 27 20:38:15 2010
Thread 1 advanced to log sequence 1004 (LGWR switch)
Current log# 4 seq# 1004 mem# 0: /hapdb/redodata/sdh/redo4.log
Current log# 4 seq# 1004 mem# 1: /hapdb/redodata/sdh/redo4_1.log
Tue Apr 27 20:38:23 2010
Thread 1 advanced to log sequence 1005 (LGWR switch)
Current log# 1 seq# 1005 mem# 0: /hapdb/redodata/sdh/redo1.log
Current log# 1 seq# 1005 mem# 1: /hapdb/redodata/sdh/redo1_1.log
node 2 :
Thread 2 cannot allocate new log, sequence 462
Checkpoint not complete
Current log# 5 seq# 461 mem# 0: /hapdb/redodata/sdh/redo5.log
Current log# 5 seq# 461 mem# 1: /hapdb/redodata/sdh/redo5_1.log
Tue Apr 27 20:36:20 2010
Thread 2 advanced to log sequence 462 (LGWR switch)
Current log# 6 seq# 462 mem# 0: /hapdb/redodata/sdh/redo6.log
Current log# 6 seq# 462 mem# 1: /hapdb/redodata/sdh/redo6_1.log
Tue Apr 27 20:36:44 2010
Thread 2 advanced to log sequence 463 (LGWR switch)
Current log# 7 seq# 463 mem# 0: /hapdb/redodata/sdh/redo7.log
Current log# 7 seq# 463 mem# 1: /hapdb/redodata/sdh/redo7_1.log
Tue Apr 27 20:37:08 2010
Thread 2 cannot allocate new log, sequence 464
Checkpoint not complete
Current log# 7 seq# 463 mem# 0: /hapdb/redodata/sdh/redo7.log
Current log# 7 seq# 463 mem# 1: /hapdb/redodata/sdh/redo7_1.log
Tue Apr 27 20:37:11 2010
Thread 2 advanced to log sequence 464 (LGWR switch)
Current log# 8 seq# 464 mem# 0: /hapdb/redodata/sdh/redo8.log
Current log# 8 seq# 464 mem# 1: /hapdb/redodata/sdh/redo8_1.log
Tue Apr 27 20:37:35 2010
Thread 2 cannot allocate new log, sequence 465
Checkpoint not complete
Current log# 8 seq# 464 mem# 0: /hapdb/redodata/sdh/redo8.log
Current log# 8 seq# 464 mem# 1: /hapdb/redodata/sdh/redo8_1.log
Tue Apr 27 20:37:38 2010
都出现无法及时写log的错误 .
然后检查了下 log文件:
SQL> select * from v$log ;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARCHIVED STATUS FIRST_CHANGE# FIRST_TIME
---------- ---------- ---------- ---------- ---------- -------- ---------------- ------------- -----------
1 1 1037 104857600 2 YES INACTIVE 1076429791762 2010-4-28 2
2 1 1038 104857600 2 NO CURRENT 1076429812227 2010-4-29 1
3 1 1035 104857600 2 YES INACTIVE 1076429700912 2010-4-27 2
4 1 1036 104857600 2 YES INACTIVE 1076429736782 2010-4-28 1
5 2 477 104857600 2 YES INACTIVE 1076429701036 2010-4-27 2
6 2 478 104857600 2 YES INACTIVE 1076429736740 2010-4-28 1
7 2 479 104857600 2 YES INACTIVE 1076429744677 2010-4-28 2
8 2 480 104857600 2 NO CURRENT 1076429802208 2010-4-29 7
SQL> select * from v$logfile ;
GROUP# STATUS TYPE MEMBER IS_RECOVERY_DEST_FILE
---------- ------- ------- -------------------------------------------------------------------------------- ---------------------
1 ONLINE /hapdb/redodata/sdh/redo1.log NO
1 ONLINE /hapdb/redodata/sdh/redo1_1.log NO
2 ONLINE /hapdb/redodata/sdh/redo2.log NO
2 ONLINE /hapdb/redodata/sdh/redo2_1.log NO
3 ONLINE /hapdb/redodata/sdh/redo3.log NO
3 ONLINE /hapdb/redodata/sdh/redo3_1.log NO
4 ONLINE /hapdb/redodata/sdh/redo4.log NO
4 ONLINE /hapdb/redodata/sdh/redo4_1.log NO
5 ONLINE /hapdb/redodata/sdh/redo5.log NO
5 ONLINE /hapdb/redodata/sdh/redo5_1.log NO
6 STALE ONLINE /hapdb/redodata/sdh/redo6.log NO
6 STALE ONLINE /hapdb/redodata/sdh/redo6_1.log NO
7 ONLINE /hapdb/redodata/sdh/redo7.log NO
7 ONLINE /hapdb/redodata/sdh/redo7_1.log NO
8 ONLINE /hapdb/redodata/sdh/redo8.log NO
8 ONLINE /hapdb/redodata/sdh/redo8_1.log NO
node1 : group 1-4 ,
node2 : group 5-8 .
每个组各有2个日志文件 .
每个日志文件大小都是100M , 太小了. 准备加到500M , 然后观察一个阶段看看.
如果还是切换频繁,考虑增加到 1G .
如果还是出现无法及时写log错误
Thread 1 cannot allocate new log, sequence 874
就多增加2个日志组. 让每个node 有6个日志组.
网上查到 http://www.eygle.com/faq/How.To. ... file.in.Rac.Raw.htm
盖老大写过 .
还有: 这个增加日志组的操作 在一个node 上操作就可以了吧?
node1 , node2 是共享redo log 的?
[本帖最后由 gaolu1234 于 2010-4-29 18:40 编辑]