The DBWn process writes dirty buffers to disk under the following conditions:
      When a server process cannot find a clean reusable buffer after scanning a threshold number of buffers, it signals DBWn to write. DBWn writes dirty buffers to disk asynchronously while performing other processing. 
      DBWn periodically writes buffers to advance the checkpoint, which is the position in the redo thread (log) from which instance recovery begins. This log position is determined by the oldest dirty buffer in the buffer cache. 

解决方案 »

  1.   

    据说是 Buffer Cache 的使用比例达到 25 %时,会写。
    CKPT 时会写。
    还有一个场景,想不起来了。。
      

  2.   

    触发dbwr条件
    1、当dirty list达到一定数量,导致Server Proceess通知DBWn写赃数据
    2、当扫描LRU list达到一定数量还未找到free buffer 时,停止搜索free buffer,直接通知DBWn写脏数据
    3、checkpoint写数据
      

  3.   

    1. 当进程在辅助LRU链表和主LRU链表上扫描以查找可以覆盖的buffer header[空闲缓冲区]时,如果已经扫描的buffer header的数量到达一定的限度(由隐藏参数:_db_block_max_scan_pct决定)时,触发DBWR进程。 
    2. 当DBWR在主LRUW链表上查找已经更新完而正在等待被写入数据文件的buffer header时,如果找到的buffer header的数量超过一定限度(由隐藏参数:_db_writer_scan_depth_pct决定)时,DBWR就不再继续往下扫描了,而转到辅助LRUW链表上将其上的脏数据块写入数据文件。
     3. 如果主LRUW链表和辅助LRUW链表上的脏数据块的总数超过一定限度,也将触发DBWR进程。该限度由隐藏参数:_db_large_dirty_queue决定。
     4. 发生增量检查点(incremental checkpoint)或完全检查点(complete checkpoint)时触发DBWR。
     5. 每隔三秒钟启动一次DBWR。
     6. 将表空间设置为离线(offline)状态时触发DBWR。
     7. 发出命令:alter tablespace … begin backup,从而将表空间设置为热备份状态时触发DBWR。
     8. 将表空间设置为只读状态时,触发DBWR。
     9. 删除对象时(比如删除某个表)会触发DBWR。