oracle进程简介

oracle进程分为三类:

1、用户进程

2、服务进程

3、后台进程


一:服务进程  Server Processes

oracle创建服务进程来处理用户进程请求连接数据库实例,用户进程总是通过单独的服务进程来连接数据库
server processes用途如下:
1、解析并运行SQL语句,包括创建和执行查询计划(query plan)
2、执行PL/SQL代码
3、从数据文件中读取数据块到数据缓冲区
4、返回结果

二:后台进程 Background Process

PMON Process Monitor Process
1、监控其他进程和执行进程恢复,例如某个服务进程被关闭
2、清理数据缓冲区和释放资源
3、向Oracle Net listener注册关于实例和调度器的信息


SMON System Monitor Process
1、执行实例恢复
2、在实例恢复的时候恢复由于文件读或者是表空间离线错误而终止的transactions
3、清理不在使用的临时段segments
4、在字典管理表空间中合并空闲的extent


DBWn Database Writer Process
将Database Buffer Cache中的脏数据写入到Datafiles中
DBWn写脏数据在一下的条件中:
1、当服务进程在扫描一定的buffer之后,未找到可用的buffer
2、当checkpoint发生的时候

LGWR Log Writer Process
将Redo log buffer中的数据写入到Redo Log Files中
LGWR写入的条件:
1、用户提交一个transaction
2、online redo log switch
3、每隔三秒中
4、redo log buffer 有1/3满
5、DBWn必须写入脏数据
When a user issues a COMMIT statement, the transaction is assigned a system change number (SCN). LGWR puts a commit record in the redo log buffer and writes it to disk immediately, along with the commit SCN and transaction's redo entries.

CKPT Checkpoint Process
CKPT更新控制文件和数据文件的头,写入检查点信息并通知DBWn将脏数据写入到磁盘中
检查点信息包括:
1、检查点位置
2、SCN(system change number)
3、online redo log中开始恢复的位置

MMON and MMNL Manageeablity Monitor Processes
The manageability monitor process (MMON) performs many tasks related to the Automatic Workload Repository (AWR). For example, MMON writes when a metric violates its threshold value, taking snapshots, and capturing statistics value for recently modified SQL objects.


The manageability monitor lite process (MMNL) writes statistics from the Active Session History (ASH) buffer in the SGA to disk. MMNL writes to disk when the ASH buffer is full.

RECO Recover Process 
自动解决分布式transaction失败

ARCn Archiver process
redo log switch的时候复制online redo log files文件中的信息到磁盘中

D000 Dispatcher process
在shared server环境中,用来连接user process和shared server process

Job Queue Processes (CJQ0 and Jnnn)
Oracle Database uses job queue processes to run user jobs

oracle   17250     1  0 00:27 ?        00:00:00 ora_j000_shared 关于这个J000这个进程号是会发生变化的,每次有任务来之后,进程号都是不相同的

for linux and python
原文地址:https://www.cnblogs.com/kellyseeme/p/5525198.html