log file switch (checkpoint incomplete)
Posted 王超元
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了log file switch (checkpoint incomplete)相关的知识,希望对你有一定的参考价值。
接手了一个新交接的库,alert日志频繁报告log file switch (checkpoint incomplete)事件
oracle文档解释:
Waiting for a log switch because the session cannot wrap into the next log. Wrapping cannot be performed because the checkpoint for that log has not completed.
查看redo日志信息:
SQL> select * from v$log; GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARCHIVED STATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME ---------- ---------- ---------- ---------- ---------- ---------- -------- ---------------- ------------- ----------- ------------ ----------- 1 1 19852 52428800 512 1 YES INACTIVE 179403613 7/27/2015 1 179417290 7/27/2015 1 2 1 19853 52428800 512 1 NO CURRENT 179417290 7/27/2015 1 281474976710 3 1 19851 52428800 512 1 YES INACTIVE 179393208 7/27/2015 1 179403613 7/27/2015 1 SQL> select * from v$logfile; GROUP# STATUS TYPE MEMBER IS_RECOVERY_DEST_FILE ---------- ------- ------- -------------------------------------------------------------------------------- --------------------- 3 ONLINE D:\APP\ADMINISTRATOR\ORADATA\YB\REDO03.LOG NO 2 ONLINE D:\APP\ADMINISTRATOR\ORADATA\YB\REDO02.LOG NO 1 ONLINE D:\APP\ADMINISTRATOR\ORADATA\YB\REDO01.LOG NO SQL>
查看切换频率:
SQL> select completion_time from v$archived_log order by 1 desc;
发现在系统繁忙时候,日志一分钟会切换好几次。
解决方案:
添加个日志组并将日志大小调整为100m
alter database add logfile group 4 (‘D:\APP\ADMINISTRATOR\ORADATA\YB\REDO04a.LOG ‘,‘D:\APP\ADMINISTRATOR\ORADATA\YB\REDO04b.LOG ‘) size 100M;
然后将其它三组redo日志的进行调整:删除已有日志组,然后重建(要将日志组调整到inactive状态后再操作)
alter database drop logfile group 3; alter database add logfile group 3 (‘D:\APP\ADMINISTRATOR\ORADATA\YB\REDO03a.LOG ‘,‘D:\APP\ADMINISTRATOR\ORADATA\YB\REDO03b.LOG ‘) size 100M;
...
以上是关于log file switch (checkpoint incomplete)的主要内容,如果未能解决你的问题,请参考以下文章
log file switch (archiving needed) 等待事件一例