Oracle体系结构及备份(十四)——bg-dbwr

159 篇文章 113 订阅
86 篇文章 1 订阅

一 什么是DBWR进程

 

        DBWR,数据库写进程。

        The database writer writes modified blocksfrom the database buffer cache to the datafiles. Oracle Database allows amaximum of 20 database writer processes (DBW0-DBW9 and DBWa-DBWj). TheDB_WRITER_PROCESSES initialization parameter specifies the number of DBWnprocesses. The database selects an appropriate default setting for thisinitialization parameter or adjusts a user-specified setting based on thenumber of CPUs and the number of processor groups.

 

        DBWn写的条件:

                发生检查点

                脏缓存到达限制

                没有自由的缓存

                超时发生

                RAC Ping请求

                表空间离线

                表空间只读

                表被删除或者截断

                开始备份表空间

 

二 操作示例


 [oracle@localhost 桌面]$ sqlplus / as sysdba;

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 6 11:05:47 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  838860800 bytes
Fixed Size		    1222192 bytes
Variable Size		  775948752 bytes
Database Buffers	   58720256 bytes
Redo Buffers		    2969600 bytes
Database mounted.

SQL> SELECT name FROM v$bgprocess WHERE paddr<>'00'; 

NAME
-----
PMON
PSP0
MMAN
DBW0
LGWR
CKPT
SMON
RECO
CJQ0
QMNC
MMON

NAME
-----
MMNL

12 rows selected.

SQL> alter system set db_writer_processes=2 scope=spfile;

System altered.

SQL> startup
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> startup force
ORACLE instance started.

Total System Global Area  838860800 bytes
Fixed Size		    1222192 bytes
Variable Size		  775948752 bytes
Database Buffers	   58720256 bytes
Redo Buffers		    2969600 bytes
Database mounted.

SQL> SELECT name FROM v$bgprocess where paddr<>'00';

NAME
-----
PMON
PSP0
MMAN
DBW0
DBW1
LGWR
CKPT
SMON
RECO
CJQ0
QMNC

NAME
-----
MMON
MMNL

13 rows selected.
SQL> alter system set db_writer_processes=12 scope=spfile;

System altered.

SQL> startup force
ORACLE instance started.

Total System Global Area  838860800 bytes
Fixed Size		    1222192 bytes
Variable Size		  784337360 bytes
Database Buffers	   50331648 bytes
Redo Buffers		    2969600 bytes
Database mounted.
Database opened.
SQL> select name from v$bgprocess where paddr<>'00';

NAME
-----
PMON
PSP0
MMAN
DBW0
DBW1
DBW2
DBW3
DBW4
DBW5
DBW6
DBW7

NAME
-----
DBW8
DBW9
DBWa
DBWb
LGWR
CKPT
SMON
RECO
CJQ0
QMNC
MMON

NAME
-----
MMNL

23 rows selected.

SQL> alter system set db_writer_processes=24 scope=spfile;

System altered.

SQL> startup force
ORACLE instance started.

Total System Global Area  838860800 bytes
Fixed Size		    1222192 bytes
Variable Size		  788531664 bytes
Database Buffers	   46137344 bytes
Redo Buffers		    2969600 bytes
Database mounted.
Database opened.
SQL> select name from v$bgprocess where paddr<>'00';

NAME
-----
PMON
PSP0
MMAN
DBW0
DBW1
DBW2
DBW3
DBW4
DBW5
DBW6
DBW7

NAME
-----
DBW8
DBW9
DBWa
DBWb
DBWc
DBWd
DBWe
DBWf
DBWg
DBWh
DBWi

NAME
-----
DBWj
LGWR
CKPT
SMON
RECO
CJQ0
QMNC
MMON
MMNL

31 rows selected.
SQL> select name from v$bgprocess where paddr<>'00' and name like 'DB%';

NAME
-----
DBW0
DBW1
DBW2
DBW3
DBW4
DBW5
DBW6
DBW7
DBW8
DBW9
DBWa

NAME
-----
DBWb
DBWc
DBWd
DBWe
DBWf
DBWg
DBWh
DBWi
DBWj

20 rows selected.
--32bit系统:dbw0----dbw9(10个)
--64bit系统:dbwa----dbwj(20个)
SQL> select count(name) from v$bgprocess where paddr<>'00' and name like 'DB%';

COUNT(NAME)
-----------
	 20

SQL> alter system set db_writer_processes=1 scope=spfile;

System altered.

SQL> startup force
ORACLE instance started.

Total System Global Area  838860800 bytes
Fixed Size		    1222192 bytes
Variable Size		  788531664 bytes
Database Buffers	   46137344 bytes
Redo Buffers		    2969600 bytes
Database mounted.
Database opened.


三 总结


        1.DBWR,数据库写进程。

        2.DBWn写的条件:发生检查点、脏缓存到达限制、没有自由的缓存、超时发生、RAC Ping请求、表空间离线、表空间只读、表被删除或者截断、开始备份表空间。

        3. db_writer_processes控制DBWn进程的最大数目,可以修改,但不能超过最大值。



  我的邮箱wgbno27@163.com
  新浪微博@Wentasy27         
  微信公众平台:JustOracle(微信号:justoracle)
  IT交流群:336882565(加群时验证 From CSDN XXX)
  Oracle交流讨论组https://groups.google.com/d/forum/justoracle
  By Larry Wen


katoonSina CSDN
@Wentasy 博文仅供参考,欢迎大家来访。如有错误之处,希望批评指正。原创博文如需转载请注明出处,谢谢 :) [CSDN博客]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值