Oracle后台进程包括数据写进程(DatabaseWriter,DBWR)、日志写进程(Log Writer,LGWR)、系统监控(System Monitor,SMON)、进程监控(Process Monitor,PMON)、检查点进程(Checkpoint Process,CKPT)、归档进程、服务进程、用户进程。
数据写进程:负责将更改的数据从数据库缓冲区高速缓存写入数据文件
日志写进程:将重做日志缓冲区中的更改写入在线重做日志文件
系统监控:检查数据库的一致性如有必要还会在数据库打开时启动数据库的恢复
进程监控:负责在一个Oracle 进程失败时清理资源
检查点进程:负责在每当缓冲区高速缓存中的更改永久地记录在数据库中时,更新控制文件和数据文件中的数据库状态信息。该进程在检查点出现时,对全部数据文件的标题进行修改,指示该检查点。在通常的情况下,该任务由LGWR执行。然而,如果检查点明显地降低系统性能时,可使CKPT进程运行,将原来由LGWR进程执行的检查点的工作分离出来,由CKPT进程实现。对于许多应用情况,CKPT进程是不必要的。只有当数据库有许多数据文件,LGWR在检查点时明显地降低性能才使CKPT运行。CKPT进程不将块写入磁盘,该工作是由DBWR完成的。 init.ora文件中 CHECKPOINT_PROCESS 参数控制CKPT进程的使能或使不能。缺省时为FALSE,即为使不能。
归档进程:在每次日志切换时把已满的日志组进行备份或归档
服务进程:用户进程服务。
用户进程:在客户端,负责将用户的SQL语句传递给服务进程,并从服务器段拿回查询数据。
To maximizeperformance and accommodate many users, a multiprocess Oracle Database systemuses background processes.Background processes consolidate functions that would otherwise be handled bymultiple database programs running for each user process. Background processesasynchronously perform I/O and monitor other Oracle Database processes toprovide increased parallelism for better performance and reliability.
SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options [oracle@localhost 桌面]$ ps -ef | grep ora_ oracle 2638 1 0 16:43 ? 00:00:00 ora_pmon_orcl oracle 2640 1 0 16:43 ? 00:00:00 ora_psp0_orcl oracle 2642 1 0 16:43 ? 00:00:00 ora_mman_orcl oracle 2644 1 0 16:43 ? 00:00:00 ora_dbw0_orcl oracle 2646 1 0 16:43 ? 00:00:00 ora_lgwr_orcl oracle 2648 1 0 16:43 ? 00:00:00 ora_ckpt_orcl oracle 2650 1 0 16:43 ? 00:00:00 ora_smon_orcl oracle 2652 1 0 16:43 ? 00:00:00 ora_reco_orcl oracle 2654 1 0 16:43 ? 00:00:00 ora_cjq0_orcl oracle 2656 1 0 16:43 ? 00:00:00 ora_mmon_orcl oracle 2658 1 0 16:43 ? 00:00:00 ora_mmnl_orcl oracle 2660 1 0 16:43 ? 00:00:00 ora_d000_orcl oracle 2662 1 0 16:43 ? 00:00:00 ora_s000_orcl oracle 2666 1 0 16:43 ? 00:00:00 ora_qmnc_orcl oracle 2683 1 0 16:43 ? 00:00:00 ora_q000_orcl oracle 2685 1 0 16:43 ? 00:00:00 ora_q001_orcl oracle 2720 1 0 16:52 ? 00:00:00 ora_j000_orcl oracle 2723 2597 0 16:52 pts/0 00:00:00 grep ora_ [oracle@localhost 桌面]$ ps -ef | grep ora_ | egrep "pmon|smon|dbw0|lgw|ckpt" oracle 2638 1 0 16:43 ? 00:00:00 ora_pmon_orcl oracle 2644 1 0 16:43 ? 00:00:00 ora_dbw0_orcl oracle 2646 1 0 16:43 ? 00:00:00 ora_lgwr_orcl oracle 2648 1 0 16:43 ? 00:00:00 ora_ckpt_orcl oracle 2650 1 0 16:43 ? 00:00:00 ora_smon_orcl SQL> desc v$bgprocess; Name Null? Type ----------------------------------------- -------- ---------------------------- PADDR RAW(4) PSERIAL# NUMBER NAME VARCHAR2(5) DESCRIPTION VARCHAR2(64) ERROR NUMBER SELECT * FROM v$bgprocess; SQL> SELECT * FROM V$bgprocess WHERE paddr<>'00' 2 ; PADDR PSERIAL# NAME -------- ---------- ----- DESCRIPTION ERROR ---------------------------------------------------------------- ---------- 52A16830 1 PMON process cleanup ########## 52A16DE4 1 PSP0 process spawner 0 ########## 52A17398 1 MMAN Memory Manager ########## PADDR PSERIAL# NAME -------- ---------- ----- DESCRIPTION ERROR ---------------------------------------------------------------- ---------- 52A1794C 1 DBW0 db writer process 0 ########## 52A17F00 1 LGWR Redo etc. ########## 52A184B4 1 CKPT checkpoint ########## PADDR PSERIAL# NAME -------- ---------- ----- DESCRIPTION ERROR ---------------------------------------------------------------- ---------- 52A18A68 1 SMON System Monitor Process ########## 52A1901C 1 RECO distributed recovery ########## 52A195D0 1 CJQ0 Job Queue Coordinator ########## PADDR PSERIAL# NAME -------- ---------- ----- DESCRIPTION ERROR ---------------------------------------------------------------- ---------- 52A1B808 1 QMNC AQ Coordinator ########## 52A19B84 1 MMON Manageability Monitor Process ########## 52A1A138 1 MMNL Manageability Monitor Process 2 ########## 12 rows selected. SQL> col description for a10; SQL> COL ERROR CLEAR; 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> set pagesize 99; SQL> SELECT name FROM v$bgprocess WHERE paddr<>'00'; NAME ----- PMON PSP0 MMAN DBW0 LGWR CKPT SMON RECO CJQ0 QMNC MMON MMNL 12 rows selected.
1.后台进程就是伴随着数据库运行的那些进程,以下几个进程非常重要:DBWR DBWN PMON SMON CKPT。
2.Linux下通过ps命令可以查看后台进程的信息。
我的邮箱:[email protected] 新浪微博:@Wentasy27 微信公众平台:JustOracle(微信号:justoracle) IT交流群:336882565(加群时验证 From CSDN XXX) Oracle交流讨论组:https://groups.google.com/d/forum/justoracle By Larry Wen
@Wentasy 博文仅供参考,欢迎大家来访。如有错误之处,希望批评指正。原创博文如需转载请注明出处,谢谢 :) [CSDN博客] |