Oracle后台进程

Oracle实例包括两部分:SGA和 一组后台进程。后台进程执行保证数据库运行所需的实际维护任务。例如,有一个进程为我们维护块缓冲区缓存,根据需要将块写出到数据文件 等等。每个进程都专注于自己的任务,但是会与所有其他进 程协同工作。例如,负责写日志文件的进程填满一个日志后转向下一个日志时,它会通知负责对填满的日志文件进行归档的进程,告诉它有活干了。

可以使用一个V$视图查看所有可能的Oracle后台进程,确定你的系统中正在使用哪些后台进程:

scott@ORCL>select paddr, name, description
  2  from v$bgprocess
  3  order by paddr desc
  4  /

PADDR 		NAME 	DESCRIPTION
-------
000007FF634DF010 CJQ0  Job Queue Coordinator
000007FF634DDFA0 QMNC  AQ Coordinator
000007FF634DAE50 SMCO  Space Manager Process
000007FF634D9DE0 VKRM  Virtual sKeduler for Resource Manager
000007FF634D5C20 MMNL  Manageability Monitor Process 2
000007FF634D4BB0 MMON  Manageability Monitor Process
000007FF634D3B40 RECO  distributed recovery
000007FF634D2AD0 SMON  System Monitor Process
000007FF634D1A60 CKPT  checkpoint
000007FF634D09F0 LGWR  Redo etc.
000007FF634CF980 DBW0  db writer process 0
000007FF634CE910 MMAN  Memory Manager
000007FF634CD8A0 DIA0  diagnosibility process 0
000007FF634CC830 PSP0  process spawner 0
000007FF634CB7C0 DBRM  DataBase Resource Manager
000007FF634CA750 DIAG  diagnosibility process
000007FF634C96E0 GEN0  generic0
000007FF634C8670 VKTM  Virtual Keeper of TiMe process
000007FF634C7600 PMON  process cleanup
00               RSMN  Remote Slave Monitor
00               PING  interconnect latency measurement
00               FMON  File Mapping Monitor Process
00               ACMS  Atomic Controlfile to Memory Server
00               DSKM  slave DiSKMon process
00               DIA1  diagnosibility process 1
00               DIA2  diagnosibility process 2
00               DIA3  diagnosibility process 3
00               DIA4  diagnosibility process 4
00               DIA5  diagnosibility process 5
00               DIA6  diagnosibility process 6
00               DIA7  diagnosibility process 7
00               DIA8  diagnosibility process 8
00               DIA9  diagnosibility process 9
00               LMON  global enqueue service monitor
00               LMD0  global enqueue service daemon 0
00               LMS0  global cache service process 0
00               LMS1  global cache service process 1
00               LMS2  global cache service process 2
00               LMS3  global cache service process 3
00               LMS4  global cache service process 4
00               LMS5  global cache service process 5
00               LMS6  global cache service process 6
00               LMS7  global cache service process 7
00               LMS8  global cache service process 8
00               LMS9  global cache service process 9
00               LMSa  global cache service process 10
00               LMSb  global cache service process 11
00               LMSc  global cache service process 12
00               LMSd  global cache service process 13
00               LMSe  global cache service process 14
00               LMSf  global cache service process 15
00               LMSg  global cache service process 16
00               LMSh  global cache service process 17
00               LMSi  global cache service process 18
00               LMSj  global cache service process 19
00               LMSk  global cache service process 20
00               LMSl  global cache service process 21
00               LMSm  global cache service process 22
00               LMSn  global cache service process 23
00               LMSo  global cache service process 24
00               LMSp  global cache service process 25
00               LMSq  global cache service process 26
00               LMSr  global cache service process 27
00               LMSs  global cache service process 28
00               LMSt  global cache service process 29
00               LMSu  global cache service process 30
00               LMSv  global cache service process 31
00               LMSw  global cache service process 32
00               LMSx  global cache service process 33
00               LMSy  global cache service process 34
00               RMS0  rac management server
00               LMHB  lm heartbeat monitor
00               DBW1  db writer process 1
00               DBW2  db writer process 2
00               DBW3  db writer process 3
00               DBW4  db writer process 4
00               DBW5  db writer process 5
00               DBW6  db writer process 6
00               DBW7  db writer process 7
00               DBW8  db writer process 8
00               DBW9  db writer process 9
00               DBWa  db writer process 10 (a)
00               DBWb  db writer process 11 (b)
00               DBWc  db writer process 12 (c)
00               DBWd  db writer process 13 (d)
00               DBWe  db writer process 14 (e)
00               DBWf  db writer process 15 (f)
00               DBWg  db writer process 16 (g)
00               DBWh  db writer process 17 (h)
00               DBWi  db writer process 18 (i)
00               DBWj  db writer process 19 (j)
00               DBWk  db writer process 20 (k)
00               DBWl  db writer process 21 (l)
00               DBWm  db writer process 22 (m)
00               DBWn  db writer process 23 (n)
00               DBWo  db writer process 24 (o)
00               DBWp  db writer process 25 (p)
00               DBWq  db writer process 26 (q)
00               DBWr  db writer process 27 (r)
00               DBWs  db writer process 28 (s)
00               DBWt  db writer process 29 (t)
00               DBWu  db writer process 30 (u)
00               DBWv  db writer process 31 (v)
00               DBWw  db writer process 32 (s)
00               DBWx  db writer process 33 (t)
00               DBWy  db writer process 34 (u)
00               DBWz  db writer process 35 (v)
00               MRP0  Managed Standby Recovery
00               ARC0  Archival Process 0
00               ARC1  Archival Process 1
00               ARC2  Archival Process 2
00               ARC3  Archival Process 3
00               ARC4  Archival Process 4
00               ARC5  Archival Process 5
00               ARC6  Archival Process 6
00               ARC7  Archival Process 7
00               ARC8  Archival Process 8
00               ARC9  Archival Process 9
00               ARCa  Archival Process 10
00               ARCb  Archival Process 11
00               ARCc  Archival Process 12
00               ARCd  Archival Process 13
00               ARCe  Archival Process 14
00               ARCf  Archival Process 15
00               ARCg  Archival Process 16
00               ARCh  Archival Process 17
00               ARCi  Archival Process 18
00               ARCj  Archival Process 19
00               ARCk  Archival Process 20
00               ARCl  Archival Process 21
00               ARCm  Archival Process 22
00               ARCn  Archival Process 23
00               ARCo  Archival Process 24
00               ARCp  Archival Process 25
00               ARCq  Archival Process 26
00               ARCr  Archival Process 27
00               ARCs  Archival Process 28
00               ARCt  Archival Process 29
00               NSA1  Redo transport NSA1
00               NSS1  Redo transport NSS1
00               NSA2  Redo transport NSA2
00               NSS2  Redo transport NSS2
00               NSA3  Redo transport NSA3
00               NSS3  Redo transport NSS3
00               NSA4  Redo transport NSA4
00               NSS4  Redo transport NSS4
00               NSA5  Redo transport NSA5
00               NSS5  Redo transport NSS5
00               NSA6  Redo transport NSA6
00               NSS6  Redo transport NSS6
00               NSA7  Redo transport NSA7
00               NSS7  Redo transport NSS7
00               NSA8  Redo transport NSA8
00               NSS8  Redo transport NSS8
00               NSA9  Redo transport NSA9
00               NSS9  Redo transport NSS9
00               NSAA  Redo transport NSAA
00               NSSA  Redo transport NSSA
00               NSAB  Redo transport NSAB
00               NSSB  Redo transport NSSB
00               NSAC  Redo transport NSAC
00               NSSC  Redo transport NSSC
00               NSAD  Redo transport NSAD
00               NSSD  Redo transport NSSD
00               NSAE  Redo transport NSAE
00               NSSE  Redo transport NSSE
00               NSAF  Redo transport NSAF
00               NSSF  Redo transport NSSF
00               NSAG  Redo transport NSAG
00               NSSG  Redo transport NSSG
00               NSAH  Redo transport NSAH
00               NSSH  Redo transport NSSH
00               NSAI  Redo transport NSAI
00               NSSI  Redo transport NSSI
00               NSAJ  Redo transport NSAJ
00               NSSJ  Redo transport NSSJ
00               NSAK  Redo transport NSAK
00               NSSK  Redo transport NSSK
00               NSAL  Redo transport NSAL
00               NSSL  Redo transport NSSL
00               NSAM  Redo transport NSAM
00               NSSM  Redo transport NSSM
00               NSAN  Redo transport NSAN
00               NSSN  Redo transport NSSN
00               NSAO  Redo transport NSAO
00               NSSO  Redo transport NSSO
00               NSAP  Redo transport NSAP
00               NSSP  Redo transport NSSP
00               NSAQ  Redo transport NSAQ
00               NSSQ  Redo transport NSSQ
00               NSAR  Redo transport NSAR
00               NSSR  Redo transport NSSR
00               NSAS  Redo transport NSAS
00               NSSS  Redo transport NSSS
00               NSAT  Redo transport NSAT
00               NSST  Redo transport NSST
00               NSAU  Redo transport NSAU
00               NSSU  Redo transport NSSU
00               NSAV  Redo transport NSAV
00               NSSV  Redo transport NSSV
00               LCK0  Lock Process 0
00               ABMR  Auto BMR Background Process
00               LSP1  Dictionary build process for Logical Standby
00               LSP0  Logical Standby
00               LSP2  Set Guard Standby Information for Logical Standby
00               CTWR  Change Tracking Writer
00               RVWR  Recovery Writer
00               FBDA  Flashback Data Archiver Process
00               GTX0  Global Txn process 0
00               GTX1  Global Txn process 1
00               GTX2  Global Txn process 2
00               GTX3  Global Txn process 3
00               GTX4  Global Txn process 4
00               GTX5  Global Txn process 5
00               GTX6  Global Txn process 6
00               GTX7  Global Txn process 7
00               GTX8  Global Txn process 8
00               GTX9  Global Txn process 9
00               GTXa  Global Txn process 10
00               GTXb  Global Txn process 11
00               GTXc  Global Txn process 12
00               GTXd  Global Txn process 13
00               GTXe  Global Txn process 14
00               GTXf  Global Txn process 15
00               GTXg  Global Txn process 16
00               GTXh  Global Txn process 17
00               GTXi  Global Txn process 18
00               GTXj  Global Txn process 19
00               RCBG  Result Cache: Background
00               EMNC  EMON Coordinator
00               DMON  DG Broker Monitor Process
00               RSM0  Data Guard Broker Resource Guard Process 0
00               NSV0  Data Guard Broker NetSlave Process 0
00               NSV1  Data Guard Broker NetSlave Process 1
00               NSV2  Data Guard Broker NetSlave Process 2
00               NSV3  Data Guard Broker NetSlave Process 3
00               NSV4  Data Guard Broker NetSlave Process 4
00               NSV5  Data Guard Broker NetSlave Process 5
00               NSV6  Data Guard Broker NetSlave Process 6
00               NSV7  Data Guard Broker NetSlave Process 7
00               NSV8  Data Guard Broker NetSlave Process 8
00               NSV9  Data Guard Broker NetSlave Process 9
00               NSVA  Data Guard Broker NetSlave Process A
00               NSVB  Data Guard Broker NetSlave Process B
00               NSVC  Data Guard Broker NetSlave Process C
00               NSVD  Data Guard Broker NetSlave Process D
00               NSVE  Data Guard Broker NetSlave Process E
00               NSVF  Data Guard Broker NetSlave Process F
00               NSVG  Data Guard Broker NetSlave Process G
00               NSVH  Data Guard Broker NetSlave Process H
00               NSVI  Data Guard Broker NetSlave Process I
00               NSVJ  Data Guard Broker NetSlave Process J
00               NSVK  Data Guard Broker NetSlave Process K
00               NSVL  Data Guard Broker NetSlave Process L
00               NSVM  Data Guard Broker NetSlave Process M
00               NSVN  Data Guard Broker NetSlave Process N
00               NSVO  Data Guard Broker NetSlave Process O
00               NSVP  Data Guard Broker NetSlave Process P
00               NSVQ  Data Guard Broker NetSlave Process Q
00               NSVR  Data Guard Broker NetSlave Process R
00               NSVS  Data Guard Broker NetSlave Process S
00               NSVT  Data Guard Broker NetSlave Process T
00               NSVU  Data Guard Broker NetSlave Process U
00               INSV  Data Guard Broker INstance SlaVe Process
00               FSFP  Data Guard Broker FSFO Pinger
00               RBAL  ASM Rebalance master
00               ARB0  ASM Rebalance 0
00               ARB1  ASM Rebalance 1
00               ARB2  ASM Rebalance 2
00               ARB3  ASM Rebalance 3
00               ARB4  ASM Rebalance 4
00               ARB5  ASM Rebalance 5
00               ARB6  ASM Rebalance 6
00               ARB7  ASM Rebalance 7
00               ARB8  ASM Rebalance 8
00               ARB9  ASM Rebalance 9
00               ARBA  ASM Rebalance 10
00               ASMB  ASM Background
00               MARK  mark AU for resync koordinator
00               GMON  diskgroup monitor
00               VBG0  Volume BG 0
00               VBG1  Volume BG 1
00               VBG2  Volume BG 2
00               VBG3  Volume BG 3
00               VBG4  Volume BG 4
00               VBG5  Volume BG 5
00               VBG6  Volume BG 6
00               VBG7  Volume BG 7
00               VBG8  Volume BG 8
00               VBG9  Volume BG 9
00               VDBG  Volume Driver BG
00               VMB0  Volume Membership 0
00               ACFS  ACFS CSS
00               XDMG  cell automation manager
00               XDWK  cell automation worker actions

已选择295行。

这个视图中PADDR不是00的行都是系统上配置和运行的进程。


中心后台进程

启动实例时也许不会看到所有进程,但是其中一些主要的进程肯定存在。如果在ARCHIVELOG模式下,你可能只会看到ARCn(归档进程),并启用自动归档。如果运行了Oracle RAC,这种Oracle配置允许一个集群中不同机器上的多个实例装载并打开相同的物理数据库,就只会看到LMD0、LCKn、LMON和LMSn。


1. PMON:进程监视器(Process Monitor)

负责在出现异常中止的连接之后完成清理。例如,如果某专用服务器“失败”或者出于某种原因被撤销,就要由PMON进程负责修正(恢复或撤销工作),并释放资源。PMON会回滚未提交的工作,并释放为失败进程分配的SGA资源

还负责监视其他的Oracle后台进程,并在必要时(如果可能的话)重启这些后台进程。如果一个共享服务器或调度器失败(崩溃),PMON会介入,并重启另一个共享服务器或调度器(对失败进程完成清理之后)。PMON会查看所有Oracle进程,可能重启这些进程,也可能适当地终止实例。例如,如果数据库日志写入器进程(LGWR)失败,就最好让实例失败。这是一个严重的错误,最安全的做法就是立即终止实例,并根据正常的恢复来修正数据(注意,这是一种很罕见的情况,要立即报告给Oracle Support)。

还会为实例做另一件事:向Oracle TNS监听器注册这个实例。实例启动时,PMON进程会询问公认的端口地址(除非直接指定),来查看是否启动并运行了一个监听器。Oracle使用的公认/默认端口是1521。如果此时监听器在另外某个端口上启动会怎么样呢?在这种情况下,原理是一样的,只不过需要设置LOCAL_LISTENER参数来显式地指定监听器地址。如果数据库实例启动时有监听器在运行,PMON会与这个监听器通信,并向它传递相关的参数,如服务名和实例的负载度量等。如果监听器未启动,PMON则会定期地试图与之联系来注册实例。

2. SMON:系统监视器(System Monitor)

SMON进程要完成所有“系统级”任务。PMON感兴趣的是单个的进程,而SMON 以系统级为出发点,这是一种数据库“垃圾收集器”。SMON所做的工作包括:

阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/A0001AA/article/details/79948131
个人分类: Oracle
上一篇Oracle服务器进程
下一篇oracle 锁定 问题
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭