今天突然应用程序报错,无法连接数据库,以连接上的也无法做任何操作,但是没有一会,又恢复正常。宕机,查看alert.log看最后出现Thread 1 cannot allocate new log, sequence 101.
分析觉得应该是dbwr写的太慢,但是redo切换的太频繁,日志量比较大造成的.
查看redo
select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARCHIVED STATUS FIRST_CHANGE# FIRST_TIMEITPUB个人空间6j&Yn5I~'e+GGm
---------- ---------- ---------- ---------- ---------- -------- ---------------- ------------- -----------ITPUB个人空间c~W8C.@WSxa
1 1 103 100288000 1 NO INACTIVE 12308155 2009-4-3 16
c&VB]_(R~N0 2 1 104 100288000 1 NO INACTIVE 12308158 2009-4-3 16
Ukp%U }do1U{q0 3 1 105 100288000 1 NO CURRENT 12308162 2009-4-3 16
准备把redo增加到500m
1.增加两个重做日志组
alter database add logfile group 4 '/opt/oracle/oradata/orcl/redo04.log' size 500m;
alter database add logfile group 5 ' /opt/oracle/oradata/orcl/redo05.log' size 500m;
2.切换日志组
alter system switch logfile;
alter system switch logfile;
3.删除3个日志组
alter database drop logfile group1;
alter database drop logfile group2;
alter database drop logfile group3;
4.重新建日志组
alter database add logfile group 1 ' /opt/oracle/oradata/orcl/redo01.log' size 500m;
alter database add logfile group 2 ' /opt/oracle/oradata/orcl/redo02.log' size 500m;
alter database add logfile group 3 ' /opt/oracle/oradata/orcl/redo03.log' size 500m;
5.切换日志组
alter system switch logfile;
alter system switch logfile;
alter system switch logfile;
6删除日志组
alter database logfile group 4
alter database logfile group 5
性能还得在继续观察一段时间.关注
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15149581/viewspace-662097/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/15149581/viewspace-662097/