Checkpoint not complete,private strand flush not complete

最近检查生产环境,alert日志中出现
Thread 1 cannot allocate new log, sequence 13018
Checkpoint not complete

private strand flush not  complete


对于这个错误信息得解释如下:

当系统要重新利用某个日志文件的时候,系统需要将该日志文件所包括的buffer cache 中的dirty block 写到相应的数据文件。由于对于一个数据库操作而言,它可能产生的redo 量仅仅是几十字节,但是对于buffer cache中确是一个block (一般为8k)。所以,对于一个仅仅是几百M的日志文件,它所保护的buffer cache 可能是几个G

一旦发生"Thread 1 cannot allocate new log",表明系统的checkpoint 没有来得及完成,也就是说 buffer cache 中的dirty data还没有完全写到数据文件,就已经有大量的日志需要写入到系统。而系统只能通知应用:checkpoint 还没有完成,你只能等待。这个时候,系统就基本处于hang 状态了 When the database waits on checkpoints,redo generation is stopped until the log switch is done

如果,我们在这个时候查看系统信息,就会发现:v$log中的日志状态大多处于active 状态; v$session_wait 中会有很多log file switch 事件的发生

解决办法: a. 添加更多的日志文件  b. 加大checkpoint 触发的频度  c. 减小redo log 的size d. 提高DBWR的效率 e. 为了更好的了解系统的运行,可以设置

log_checkpoint_interval = 0

log_checkpoint_timeout = 0

log_checkpoints_to_alert=True


归档与非归档
http://blog.sina.com.cn/s/blog_646927650100vapd.html

http://wenku.baidu.com/view/7facdf22192e45361066f589.html


----------------------------------------------------------------------------
改变online redo log文件的大小:
select * from v$log;select * from v$logfile;

v$log的status字段有三种状态:
ACTIVE
CURRENT
INACTIVE
其中active表示正在归档,current表示当前的online redo,inactive表示已经归档。

切换日志(改变current):
alter system switch logfile; ( 增量检查点 ) 
alter system switch checkpoint; ( full checkpoint)

如何让active变成inactive呢?1,等待归档进程完成归档操作。2,使用命令alter system checkpoint.


要想改变online redo的大小,只能改变inactive的文件,改变的步骤是 先drop 再reuse(也可以不reuse生成新的online redo文件)

alter database drop logfile group 1;

alter database add logfile group 1 'D:\oracle\....redo1.log'  size 200M reuse;

如果一个OS中有多个库,千万不要把 online redo搞串了这样 会很杯具的。
-----------------------------------------------------------------------------
查看参数: db_writer_processes ,默认为cpu个数/8
                      dbwr_io_slaves 
这二个参数和DBWn有关,DBWn有二种:多个 DBWn进程,1个DBWn带多个slave。

同时也可以修改参数
log_checkpoints_to_alert=true 
查看alter对于checkpoint的情况。


-----------------------------------------------------------------------------

Alert Log Messages: Private Strand Flush Not Complete [ID 372557.1] 

http://blog.csdn.net/amber112/article/details/6292171
-----------------------------

1) Give the checkpoint process more time to cycle through the logs
       -  add more redo log groups
       -  increase the size of the redo logs
2) Reduce the frequency of checkpoints
        - increase LOG_CHECKPOINT_INTERVAL
        - increase size of online redo logs
3) Improve the efficiency of checkpoints enabling the CKPT process
with CHECKPOINT_PROCESS=TRUE
4) Set LOG_CHECKPOINT_TIMEOUT = 0.  This disables the checkpointing
based on
     time interval.
5) Another means of solving this error is for DBWR to quickly write
the dirty
buffers on disk.   

---------------------------------------------------------


经验总结:
http://space.itpub.net/11447732/viewspace-628532
good way:
http://shenblog.com/2010/11/26/thread-1-cannot-allocate-new-log-sequence-19-checkpoint-not-complete/

ways:
http://linux.net527.cn/fuwuqiyingyong/Oracle/2012/0109/45359.html



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11990065/viewspace-720845/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/11990065/viewspace-720845/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值