Oracle 19c 后台进程

0    92    0

👉 本文共约40555个字,系统预计阅读时间或需153分钟。

01

数据库服务器(Database Server)

img

一个Oracle数据库至少由一个数据库实例和一个数据库组成。数据库实例部分处理内存和进程,数据库部分则由称为数据文件的物理文件组成,并且可以是非容器数据库或多租户容器数据库。Oracle数据库在其运行期间还会使用多个数据库系统文件。

单实例数据库体系结构由一个数据库实例和一个数据库组成。数据库和数据库实例之间存在一对一的关系。可以在同一台服务器上安装多个单实例数据库。每个数据库都有单独的数据库实例。此配置对于在同一台计算机上运行不同版本的Oracle数据库很有用。

Oracle Real Application Clusters (Oracle RAC) 数据库的体系结构是由在分开的多台服务器计算机上运行的多个实例组成。它们都共享同一个数据库。服务器群集在一端表现为单个服务器,而在另一端则为最终用户和应用程序。此配置旨在实现高可用性,可伸缩性和高端的性能。

监听器是一个数据库服务器进程。它接收客户端请求,建立与数据库实例的连接,然后将客户端连接移交给服务器进程。监听器可以在数据库服务器上本地运行,也可以远程运行。典型的Oracle RAC环境是远程运行的。

02

数据库实例(Database Instance)

img

数据库实例包含一组Oracle数据库后台进程和内存结构。主要的内存结构是系统全局区 (SGA) 和程序全局区 (PGA)。后台进程对数据库中存储的数据(数据文件)进行操作,并使用内存结构完成其工作。数据库实例仅存在于内存中。

Oracle数据库还创建服务器进程,以代表客户端程序处理与数据库的连接,并执行客户端程序的工作。例如,解析和运行SQL语句,以及检索结果并将结果返回给客户端程序。这些类型的服务器进程也称为前台进程。

注意:更多详细信息,请看如下内容:Oracle Database Instance.

03

系统全局区(System Global Area)

img

系统全局区域 (SGA) 是包含一个Oracle数据库实例的数据和控制信息的存储区域。数据库所有的服务器进程和后台进程共享方式使用SGA。启动数据库实例时,将会显示SGA分配的内存量。SGA包含以下数据结构:

•共享池 (Shared pool):在多个用户之间共享各种的缓存结构;例如,共享池存储已解析的SQL,PL/SQL代码,系统参数和数据字典信息。共享池几乎涉及数据库中发生的每个操作。例如,如果用户执行SQL语句,则Oracle数据库将访问共享池。

•闪回缓冲区 (Flashback buffer):是SGA中的可选组件。启用闪回数据库后,将启动称为恢复写程序 (RVWR) 的后台进程。RVWR定期将修改后的块从缓冲区高速缓存复制到闪回缓冲区,然后将闪回数据库数据从闪回缓冲区写入闪回数据库日志,以循环方式重用。

•数据库高速缓冲区 (Database buffer cache):是存储从数据文件读取的数据块副本的内存区域。缓冲区是主内存地址,缓冲区管理器在其中临时缓存当前或最近使用的数据块。并发连接到数据库实例的所有用户共享对数据库高速缓冲区的访问。

•数据库智能闪存缓存 (Database Smart Flash):是Solaris或Oracle Linux上运行的数据库的数据库高速缓冲区的可选内存扩展。它为数据库中的数据块提供了2级缓存。针对读取密集型的在线事务处理 (OLTP) 工作负载,以及数据仓库 (DW) 中的即席查询 (Ad Hoc) 和批量数据修改工作,它可以提升这两种工作的响应时间和总体吞吐量。数据库智能闪存缓存驻留在一个或多个闪存设备上,这些设备是使用闪存的固态存储设备。数据库智能闪存缓存通常比其他主内存更经济,并且比磁盘驱动器快一个数量级。

•重做日志缓冲区 (Redo log buffer):是SGA中的循环缓冲区,用于保存有关对数据库所做的更改的信息。这些信息存储在重做条目中。重做条目包含重建(或重做)通过数据操作语言 (DML),数据定义语言 (DDL) 或内部操作对数据库所做的更改所必需的信息。如有必要,可将重做条目用于数据库恢复。

•大池 (Large pool):是一个可选的内存区域,用于大于共享池的内存分配。大池可以为如下内容提供更大的内存分配:共享服务器的用户全局区域 (UGA),Oracle XA接口(用于事务与多个数据库进行交互的地方),并行执行语句的消息缓冲区,用于Recovery Manager (RMAN) I/O 从属进程的缓冲区和延迟插入。

•内存中列式存储(In-Memory Area):是一个可选组件,使对象(表,分区和其他类型)可以以称为列格式的新格式存储在内存中。与传统的磁盘格式相比,此格式使扫描,联接和聚合的执行速度快得多,从而为OLTP和DW环境提供了快速的报告和DML性能。相对于在返回包含多列的少量行上运行的OLTP,此功能对在运行返回包含少量列的多行的分析应用程序特别有用。

•内存优化池(Memoptimize Pool):是一个可选组件,可为基于键的查询提供高性能和可伸缩性。Memoptimize池包含两部分,即memoptimize缓冲区和哈希索引。快速查询 (Fast Lookup) 使用memoptimize池中的哈希索引结构提供对给定表中块的快速访问 (启用MEMOPTIMIZE FOR READ选项) 以永久固定在缓冲区高速缓存中,以避免磁盘 I/O。Memoptimize池中的缓冲区与数据库缓冲区完全分开。哈希索引是在配置Memoptimized Rowstore 时创建的,并由Oracle数据库自动维护。

•共享I / O池(Shared I/O SecureFiles):用于SecureFile大对象 (LOB) 上的大型 I/O 操作。LOB是一组数据类型,旨在保存大量数据。SecureFile是一个LOB存储参数,允许重复数据删除,加密和压缩。

•流池(Streams pool):由Oracle Streams,Data Pump和GoldenGate集成的捕获和应用流程使用。Streams池存储缓冲的队列消息,并且为Oracle Streams捕获进程和应用进程提供内存。除非您进行特定配置,否则Streams池的大小从零开始。使用Oracle Streams时,池大小会根据需要动态增加。

•Java池(Java pool):用于Java虚拟机 (JVM) 中所有特定于会话的Java代码和数据。Java池内存的使用方式不同,具体取决于Oracle数据库的运行模式。

•固定的SGA(Fixed SGA):是SGA的一个组成部分,一个内部整理区域,其大小因平台而异,并随发行版本的不同而变化。其中包含有关数据库和数据库实例的状态的一般信息以及进程之间进行通信的信息(固定SGA包含一组指向SGA其他组件的变量以及包含各种参数值的变量)。固定SGA的大小是我们无法控制的,通常很小。可以将此区域视为SGA的引导区,Oracle在内部使用此东西来查找SGA的其他部分。SGA的固定区域包含数千个原子变量,小型数据结构(例如锁存器和指向SGA其他区域的指针)。这些变量以及它们的数据类型,大小和内存地址都列在固定表 X$KSMFSV 中。

注意:更多详细信息,请看如下内容:Overview of the System Global Area (SGA).

04

程序全局区(Program Global Area)

img

程序全局区域(PGA)是一个非共享的内存区域,其中包含专门由服务器和后台进程使用的数据和控制信息。Oracle数据库创建服务器进程,以代表客户端程序处理与数据库的连接。在专用服务器环境中,为每个服务器和启动的后台进程创建一个PGA。每个PGA都由堆栈空间,哈希区域,位图合并区域和用户全局区域(UGA)组成。当终止与之关联的服务器或后台进程时,将释放PGA。

•在共享服务器环境中,多个客户端用户共享服务器进程。UGA被移入大型池,而PGA仅具有堆栈空间,哈希区域和位图合并区域。

•在专用服务器会话中,PGA由以下组件组成:

‣SQL工作区 (SQL work areas):排序区供排序数据的函数使用,例如ORDER BY和GROUP BY。

‣会话内存 (Session memory):此用户会话数据存储区分配给会话变量,例如登录信息和数据库会话所需的其他信息。OLAP池管理OLAP数据页,这些数据页等效于数据块。

‣私有SQL区域 (Private SQL area):此区域保存有关已解析的SQL语句的信息以及其他特定于会话的信息以供处理。当服务器进程执行SQL或PL / SQL代码时,该进程使用私有SQL区域存储绑定变量值,查询执行状态信息和查询执行工作区。相同或不同会话中的多个私有SQL区域可以指向SGA中的单个执行计划。持久区域 (persistent area) 包含绑定变量值。运行时区域 (runtime area) 包含查询执行状态信息。游标是专用SQL区域中特定区域的名称或句柄。您可以将游标视为客户端上的指针,以及服务器端上的状态。因为游标与私有SQL区域紧密相关,所以有时可以互换使用这些术语。

‣堆栈空间 (Stack space):堆栈空间是分配用于保存会话变量和数组的内存。

‣散列区域 (hash area):此区域用于执行表的散列连接。

‣位图合并区域 (bitmap merge area):此区域用于合并从多个位图索引的扫描中检索到的数据。

注意:更多详细信息,请看如下内容:Overview of the Program Global Area (PGA).

05

后台进程(Background processes)

img

后台进程是数据库实例的⼀部分,它执⾏操作数据库和使多个⽤户的性能⼤化 所需的维护任务。每个后台进程执⾏⼀个独特的任务,但与其他进程⼀起⼯作。启动 数据库实例时,Oracle数据库会⾃动创建后台进程。存在的后台进程取决于数据库中 正在使⽤的功能。启动数据库实例时,必要的后台进程将⾃动启动。您可以根据需要 稍后启动可选的后台进程。

所有典型的数据库配置中都存在必要的的后台进程。默认情况下,这些进程使⽤ 初始化参数⽂件中的低配置,开始在读/写模式的数据库实例中运⾏。只读数据库实 例将禁⽤其中⼀些进程。必要的后台进程包括进程监控进程 (PMON),进程管理器进 程 (PMAN),监听器注册进程 (LREG),系统监控进程 (SMON),数据库写进程 (DBWn),检查点进程 (CKPT),可管理性监控进程 (MMON),可管理性监控器精简进 程 (MMNL),恢复程序进程 (RECO) 和⽇志写进程 (LGWR)。

⼤多数可选的后台进程特定于任务或功能。⼀些常⻅的可选过程包括归档进程 (ARCn),作业队列协调进程 (CJQ0),恢复写⼊进程 (RVWR),闪回数据存档进程 (FBDA) 和空间管理协调进程 (SMCO)。

从属进程是代表其他进程执⾏⼯作的后台进程。例如,分派进程 (Dnnn) 和共享 服务器进程 (Snnn)。

06

共享池(shared pool)

img

共享池是系统全局区 (SGA) 的组成部分,负责缓存各种类型的程序数据。例如,共享池存储已解析的SQL,PL/SQL代码,系统参数和数据字典信息。共享池⼏乎涉及数据库中发⽣的每个操作。例如,如果⽤户执⾏SQL语句,则Oracle数据库将访问共享池。

共享池分为⼏个⼦组件:

•库⾼速缓存 (Library cache):是⼀种共享池内存结构,⽤于存储可执⾏的 SQL和PL/SQL代码。该缓存包含共享的SQL和PL/SQL区域以及控制结构,例如锁和库缓存句柄。当执⾏SQL语句时,数据库尝试重⽤以前执⾏的代码。如果库⾼速缓存中存在SQL语句的已解析表示形式并且可以共享,则数据库将重⽤代码。此操作称为软解析或库⾼速缓存命中。否则,数据库必须构建应⽤程序代码的新的可执⾏版本,这称为硬解析或库⾼速缓存未命中。

•保留池 (Reserved pool):是共享池中的⼀个内存区域,Oracle数据库可使⽤ 该内存区域来分配连续的⼤块内存。数据库从共享池中按照Chunk⽅式分配内存。Chunk允许将⼤型对象(超过5 KB)加载到缓存中,⽽⽆需单个连续区域。这样,数据库减少了由于碎⽚⽽耗尽连续内存的可能性。

•数据字典⾼速缓存 (Data dictionary cache):存储有关数据库对象的信息(即字典数据)。此缓存也称为⾏缓存,因为它将数据保存为⾏⽽不是缓冲区。

•服务器结果缓存 (Server result cache):是共享池中的⼀个内存池,并保存结果集。服务器结果缓存包含SQL查询结果缓存和PL/SQL函数结果缓存,它们共享相同的基础结构。SQL查询结果缓存存储查询和查询⽚段的结果。⼤多数应⽤程序都受益于这种性能改进。PL/SQL函数结果缓存存储函数结果集。结果缓存的良好候 选者是经常调⽤的函数,这些函数依赖于相对静态的数据。

•其他组件 (Other components):包括队列,锁存器,信息⽣命周期管理 (ILM) 位图表,活动会话历史记录 (ASH) 缓冲区和其他次要内存结构。排队是共享 的内存结构(锁),⽤于序列化对数据库资源的访问。它们可以与会话或事务相关 联。例如:控制⽂件事务,数据⽂件,实例恢复,介质恢复,事务恢复,作业队列等。锁存器⽤作低级序列化控制机制,⽤于保护SGA中的共享数据结构免于同时访问。例如:⾏⾼速缓存对象,库⾼速缓存pin和⽇志⽂件并⾏写⼊。

注意:更多详细信息,请看如下内容:Shared Pool.

07

⼤池(Large Pool)

img

⼤池是数据库管理员可以配置的可选内存区域,可以为以下各项提供⼤内存分配:

•⽤户全局区域 (UGA):共享服务器和Oracle XA接⼝的会话内存(⽤于事务与多个数据库交互)

•I/O 缓冲区 (I/O Buffer Area):I/O服务器进程,并⾏查询操作中使⽤的消息缓冲区,Recovery Manager (RMAN) I/O从属进程的缓冲区,以及存储⾼级排队内存表。

•延迟插⼊池 (Deferred Inserts Pool):快速提取功能可将数据库中定义为MEMOPTIMIZE FOR WRITE的表进⾏⾼频单⾏数据插⼊。快速摄取的插⼊物也称 为延迟插⼊物。它们初在⼤缓冲池中缓冲,然后在每个对象每个会话每次写⼊1MB或60秒后由空间管理协调器 (SMCO) 和Wxxx从属后台进程异步写⼊磁盘。在SMCO后台进程进⾏扫描之前,任何会话(包括写⼊的会话)都⽆法读取该缓冲池中缓冲的任⼀数据,即使已提交的会话。该池在⼤型池中被初始化是在第⼀⾏数据 插⼊memoptimized 表时进⾏。当有⾜够的空间时,将从⼤型池中分配2G。如果⼤型池中没有⾜够的空间,则会在内部发现并⾃动清除ORA-4031,然后使⽤⼀半的 请求内存⼤⼩重试分配。如果⼤型池中仍然没有⾜够的空间,则使⽤512M和256M 重试分配,然后禁⽤该功能,直到重新启动实例。初始化池后,⼤⼩将保持不变。它不能增⻓或收缩。

•可⽤内存

⼤型池与共享池中的保留空间不同,共享池中的保留空间与从共享池分配的其他 内存使⽤相同的近少使⽤ (LRU) 列表。⼤池没有LRU列表。内存已分配,在使⽤完之前⽆法释放。

来⾃⽤户的请求是单个API调⽤,属于⽤户的SQL语句。在专⽤服务器环境中,⼀个服务器进程处理单个客户端进程的请求。每个服务器进程都使⽤系统资源,包括CPU周期和内存。在共享服务器环境中,将发⽣以下操作:

1.客户端应⽤程序向数据库实例发送请求,并且分派进程接收该请求。

\2. 分派进程将请求放在⼤池中的请求队列上。

\3. 下⼀个可⽤的共享服务器进程将处理该请求。共享服务器进程检查公共请求 队列中是否有新请求,并以先进先出的⽅式接收新请求。⼀个共享服务器进 程在队列中接收⼀个请求。

\4. 共享服务器进程对数据库进⾏所有必要的调⽤以完成请求。⾸先,共享服务器进程访问共享池中的库缓存以验证请求的项⽬;例如,它检查表是否存在,⽤户是否具有正确的特权等等。接下来,共享服务器进程访问缓冲区⾼速缓存以检索数据。如果数据不存在,则共享服务器进程将访问磁盘。不同的共享服务器进程可以处理每个数据库调⽤。因此,解析查询,获取第⼀⾏,获取下⼀⾏以及关闭结果集的请求可能分别由不同的共享服务器进程处理。由于不同的共享服务器进程可能会处理每个数据库调⽤,因此⽤户全局区域 (UGA) 必须是共享内存区域,因为UGA包含有关每个客户端会话的信 息。反过来说,UGA包含有关每个客户端会话的信息,并且必须对所有共享服务器进程可⽤,因为任何共享服务器进程都可以处理任何会话的数据库调⽤。

\5. 请求完成后,共享服务器进程将响应放置在⼤型池中的呼叫分派进程的响应队列上。每个分派进程都有⾃⼰的响应队列。

\6. 响应队列将响应发送到分派进程。

\7. 分派进程将完成的请求返回到适当的客户端应⽤程序。

注意:更多详细信息,请看如下内容:Large Pool.

08

数据库⾼速缓冲区(Database Buffer Cache)

img

数据库缓冲区⾼速缓存,也称为缓冲区⾼速缓存,是系统全局区域 (SGA) 中的存储区域,⽤于存储从数据⽂件读取的数据块的副本。缓冲区是数据库块⼤⼩的内存 块。每个缓冲区都有⼀个称为数据库缓冲区地址 (DBA) 的地址。同时连接到数据库实例的所有⽤户共享对缓冲区⾼速缓存的访问。缓冲区⾼速缓存的⽬标是优化物理I/O, 并将经常访问的块保留在缓冲区⾼速缓存中,并将不经常访问的块写⼊磁盘。

Oracle数据库⽤户进程第⼀次需要特定数据时,它将在数据库缓冲区⾼速缓存中搜索数据。如果进程发现缓存中已存在的数据(缓存命中),则可以直接从内存中读取数据。如果该进程在缓存中找不到数据(缓存未命中),则它必须在访问数据之前 将数据块从磁盘上的数据⽂件复制到缓存中的缓冲区中。通过缓存命中访问数据⽐通 过缓存未命中访问数据更快。

⾼速缓存中的缓冲区由复杂算法管理,该算法使⽤近少使⽤ (LRU) 列表和 Touch Count算法的组合。LRU有助于确保近使⽤的块倾向于保留在内存中,以 ⼤程度地减少磁盘访问。

数据库⾼速缓冲区包括以下内容:

•默认池 (Default pool):是通常缓存块的位置。默认块⼤⼩为8 KB。除⾮您⼿动配置单独的池,否则默认池是唯⼀的缓冲池。其他池的可选配置对默认池⽆效。

•保留池 (Keep pool):适⽤于经常访问但由于空间不⾜⽽在默认池中过期的块。保留缓冲池的⽬的是在内存中保留指定的对象,从⽽避免I/O操作。

•回收池 (Recycle pool):⽤于不经常使⽤的块。回收池可防⽌指定的对象占⽤缓存中不必要的空间。

•⾮默认缓冲池 (Non-default buffer pools):适⽤于使⽤2 KB,4 KB,16 KB 和32 KB⾮标准块⼤⼩的表空间。每个⾮默认块⼤⼩都有其⾃⼰的池。Oracle数据库以与默认池相同的⽅式管理这些池中的块。

•数据库智能闪存缓存 (Flash cache):使您可以使⽤闪存设备来增加缓冲区缓 存的有效⼤⼩,⽽⽆需添加更多主内存。闪存缓存可以通过将数据库缓存的需频繁 访问的数据存储到闪存中⽽不是从磁盘读取数据来提⾼数据库性能。当数据库请求 数据时,系统⾸先在数据库缓冲区⾼速缓存中查找。如果找不到数据,则系统将在 数据库智能闪存缓存中查找。如果它在那⾥找不到数据,则只会在磁盘存储中查 找。您必须在Oracle Real Application Clusters环境中的所有实例上配置闪存缓存, 或者不配置任何节点的闪存存储。

•最近最少使⽤列表(LRU):包含指向脏缓冲区和⾮脏缓冲区的指针。LRU 列表有⼀个热端和⼀个冷端。冷缓冲区是近未使⽤过的缓冲区。热缓冲区经常被 访问并且近已经被使⽤。从概念上讲,只有⼀个LRU,但是对于数据并发,数据 库实际上使⽤了多个LRU。

•检查点队列 (Checkpoint queue):检查点队列是⼀个链表结构,是由缓冲区 头部结构构成;当数据块被修改后,缓冲区通过此链表结构来跟踪数据块的修改。链表的顺序是根据早应⽤于该数据块的RBA(Redo Block Address)地址排序得到的。

•Flash缓冲区 (Flash Buffer Area):由DEFAULT Flash LRU链和KEEP Flash LRU链组成。如果没有数据库智能闪存缓存,则当进程尝试访问某个块并且该块在 缓冲区缓存中不存在时,该块将⾸先从磁盘读⼊内存(物理读取)。当内存中缓冲 区⾼速缓存已满时,将根据近少使⽤ (LRU) 机制将缓冲区从内存中逐出。使⽤ Database Smart Flash Cache,当⼲净的内存中缓冲区过期时,该缓冲区的内容将通过Database Writer进程 (DBWn) 在后台写⼊闪存中,并且缓冲区头作为元数据保留在内存中DEFAULT闪存或KEEP闪存LRU列表,具体取决于FLASH_CACHE对象属性的值。KEEP闪存LRU列表⽤于将缓冲区头保留在单独的列表上,以防⽌常规缓冲区头替换它们。因此,属于指定为KEEP的对象的闪存缓冲区标头倾向于在闪存缓存中保留更⻓时间。如果将FLASH_CACHE对象属性设置为NONE,则系统不会在闪存缓存或内存中保留相应的缓冲区。当再次访问已过期的内存缓冲区时,系统将检查闪存缓存。如果找到了缓冲区,它将从闪存缓存中读回它,这仅花费从磁 盘读取的时间的⼀⼩部分。跨实时应⽤程序群集 (RAC) 的闪存缓存缓冲区的⼀致性 与缓存融合的维护⽅式相同。因为闪存⾼速缓存是扩展⾼速缓存,并且直接路径I/O 完全绕过了缓冲区⾼速缓存,所以此功能不⽀持直接路径I/O。请注意,系统不会将 脏缓冲区放⼊闪存缓存中,因为它可能必须将缓冲区读取到内存中才能对它们进⾏ 检查点,因为写⼊闪存缓存不会计⼊检查点。

注意:更多详细信息,请看如下内容:Database Buffer Cache.

09

内存中列式存储区(In-Memory Area)

img

In-Memory存储区是⼀个可选的SGA组件,其中包含内存中列存储(IM列存 储),该存储区使⽤针对快速扫描进⾏了优化的列格式将表和分区存储在内存中。IM 列存储使数据能够以传统的⾏格式(在缓冲区⾼速缓存中)和列格式同时在SGA中填充。数据库透明地将在线事务处理 (OLTP) 查询(例如主键查找)发送到缓冲区⾼速缓存,并将分析和报告查询发送到IM列存储。在获取数据时,Oracle数据库还可以从同⼀查询中的两个内存区域读取数据。双格式体系结构不会使内存需求加倍。缓冲区⾼速缓存经过优化,可以以⽐数据库⼩得多的⼤⼩运⾏。

您应该仅在IM列存储中填充关键的数据。要将对象添加到IM列存储中,请在创建或更改对象时为该对象打开INMEMORY属性。您可以在表空间(对于表空间中的所 有新表和视图),表,(⼦)分区,物化视图或对象内的列⼦集上指定此属性。

IM列存储以优化的存储单元(⽽不是传统的Oracle数据块)管理数据和元数据。内存中压缩单元 (IMCU) 是⼀种压缩的只读存储单元,其中包含⼀个或多个列的数 据。快照元数据单元 (SMU) 包含相关IMCU的元数据和事务信息。每个IMCU都映射到 ⼀个单独的SMU。

表达式统计信息存储 (ESS) 是⼀个存储有关表达式评估的统计信息的存储库。ESS驻留在SGA中,并且也保留在磁盘上。启⽤IM列存储后,数据库会将ESS⽤于其 内存中表达式(IM表达式)功能。内存中表达单元 (IMEU) 是⽤于存储实现的IM表达式和⽤户定义的虚拟列的存储容器。请注意,ESS独⽴于IM列存储。ESS是数据库的永久组件,不能禁⽤。

从概念上讲,IMEU是其⽗IMCU的逻辑扩展。就像IMCU可以包含多个列⼀样,IMEU可以包含多个虚拟列。每个IMEU都恰好映射到⼀个IMCU,映射到同⼀⾏集。IMEU包含与其关联的IMCU中包含的数据的表达结果。填充IMCU后,还将填充关联 的IMEU。

典型的IM表达式包含⼀列或多列(可能带有常量),并且与表中的⾏具有⼀对⼀的映射关系。例如,⼀个EMPLOYEES表的IMCU包含Weekly_salary列的1-1000⾏。对于此IMCU中存储的⾏,IMEU计算⾃动检测到的IM表达式weekly_salary 52,并将 ⽤户定义的虚拟列Quarterly_salary定义为weekly_salary 12。IMCU中的第三⾏下映 射到IMEU中的第三⾏下。

In-Memory区细分为两个池:⼀个1MB列式数据池,⽤于存储填充到内存中的实 际列格式数据 (IMCU和IMEU),以及⼀个64K元数据池,⽤于存储有关对象的元数 据。填充到IM列存储中。这两个库的相对⼤⼩由内部启发算法确定。In-Memory区中 的⼤部分内存都分配给1MB池。内存区域的⼤⼩由初始化参数INMEMORY_SIZE(默认值为0)控制,并且⼩⼤⼩必须为100MB。从Oracle Database 12.2开始,您可以通过ALTER SYSTEM命令将INMEMORY_SIZE参数增加⾄少128MB,来动态增加内存 区域的⼤⼩。请注意,⽆法动态缩⼩内存区域的⼤⼩。

In-Memory表在⾸次访问表数据或数据库启动时会获取在IM列存储中分配的IMCU。通过从磁盘格式转换为新的内存列式格式,可以创建表的内存副本。每次实例重新启动时都会完成此转换,因为IM列存储副本仅驻留在内存中。完成此转换后,表 的内存版本逐渐可⽤于查询。如果对表进⾏了部分转换,则查询能够使⽤部分内存版本并转到磁盘进⾏其余操作,⽽不必等待整个表都被转换。

为了响应查询和数据操作语⾔ (DML),服务器进程扫描列数据并更新SMU元数据。后台进程将磁盘中的⾏数据填充到IM列存储中。In-Memory协调进程 (IMCO) 是启动后台填充和重新填充列式数据的后台进程。空间管理协调进程 (SMCO) 和空间管理⼯作进程 (Wnnn) 是后台进程,它们代表IMCO实际填充和重新填充数据。DML块更改将写⼊缓冲区⾼速缓存,然后再写⼊磁盘。然后,后台进程根据元数据失效和查询请求将磁盘中的⾏数据重新填充到IM列存储中。

您可以启⽤ In-Memory 快速启动功能,以将IM列存储中的列数据以压缩列格式写回到数据库中的表空间。此功能使数据库启动更快。请注意,此功能不适⽤于 IMEU,它们总是从IMCU动态填充。

注意:更多详细信息,请看如下内容:Introduction to Oracle Database In-Memory.

10

数据库数据⽂件(Database Data Files)

img

数据库是⼀组存储⽤户数据和元数据的物理⽂件。元数据由有关数据库服务器的结构,配置和控制信息组成。您可以将数据库设计为多租户容器数据库 (CDB) 或⾮容器数据库 (non-CDB)(20c中只⽀持多租户结构)。

CDB由⼀个CDB根容器(也称为根),唯⼀的⼀个种⼦可插⼊数据库(种⼦ PDB),零个或多个⽤户创建的可插拔数据库(简称为PDB)以及零个或多个应⽤程序容器组成。整个CDB称为系统容器。对于⽤户或应⽤程序,PDB在逻辑上显示为单 独的数据库。

CDB根容器名为CDB $ ROOT,包含多个数据⽂件,控制⽂件,重做⽇志⽂件, 闪回⽇志和归档的重做⽇志⽂件。数据⽂件存储与所有PDB共享的Oracle提供的元数 据和普通⽤户(每个容器中已知的⽤户)。

种⼦PDB名为PDB $ SEED,是系统提供的PDB模板,其中包含可⽤于创建新 PDB的多个数据⽂件。

常规PDB包含多个数据⽂件,这些⽂件包含⽀持应⽤程序所需的数据和代码。例 如,⼈⼒资源应⽤程序。⽤户仅与PDB交互,⽽不与种⼦PDB或根容器交互。您可以在CDB中创建多个PDB。多租户体系结构的⽬标之⼀是每个PDB与应⽤程序具有⼀对 ⼀的关系。

应⽤程序容器是CDB中⽤于存储应⽤程序数据的PDB的可选集合。创建应⽤程序 容器的⽬的是拥有独⼀的主应⽤程序定义。CDB中可以有多个应⽤程序容器。

数据库分为称为表空间的逻辑存储单元,这些逻辑存储单元共同存储所有数据库 数据。每个表空间由⼀个或多个数据⽂件构成。根容器和常规PDB具有SYSTEM, SYSAUX,USERS,TEMP和UNDO表空间(在常规PDB中为可选)。种⼦PDB具有 SYSTEM,SYSAUX,TEMP和可选的UNDO表空间。

11

数据库数据⽂件(Database Data Files)

img

以下数据库系统⽂件在Oracle数据库操作期间使⽤,并位于数据库服务器上。请注意,数据⽂件是属于数据库容器的物理⽂件,在此不再描述。

•控制⽂件:控制⽂件是必需⽂件,⽤于存储有关数据⽂件和联机重做⽇志⽂件 的元数据;例如,它们的名称和状态。数据库实例需要此信息才能打开数据库。控制⽂件还包含在数据库未打开时必须可访问的元数据。强烈建议您在数据库服务器中制作控制⽂件的多个副本,以实现⾼可⽤性。

•参数⽂件:此必需⽂件定义了数据库实例启动时的配置⽅式。它可以是初始化参数⽂件 (pfile) 或服务器参数⽂件 (spfile)。

•联机重做⽇志⽂件:这些必需的⽂件在发⽣更改时将更改存储到数据库中,并⽤于数据恢复。

•⾃动诊断存储库 (ADR):ADR是基于⽂件的存储库,⽤于存储数据库诊断数据,例如跟踪,转储,警报⽇志,运⾏状况监视器报告等。它具有跨多个实例和多 个产品的统⼀⽬录结构。数据库,Oracle⾃动存储管理 (Oracle ASM),侦听器, Oracle Clusterware和其他Oracle产品或组件将所有诊断数据存储在ADR中。每个产 品的每个实例都将诊断数据存储在ADR中其⾃⼰的主⽬录下。

•备份⽂件:这些可选⽂件⽤于数据库恢复。通常,当介质故障或⽤户错误损坏或删除原始⽂件时,可以还原备份⽂件。

•存档的重做⽇志⽂件:这些可选⽂件包含数据库实例⽣成的数据更改的持续历史记录。使⽤这些⽂件和数据库备份,您可以恢复丢失的数据⽂件。也就是说,存档⽇志可恢复已还原的数据⽂件。

•密码⽂件:此可选⽂件使使⽤SYSDBA,SYSOPER,SYSBACKUP, SYSDG,SYSKM,SYSRAC和SYSASM⻆⾊的⽤户可以远程连接到数据库实例并执⾏管理任务。

•钱包:对于应⽤程序使⽤密码凭据连接到数据库的⼤规模部署,可以将此类凭据存储在客户端Oracle钱包中。Oracle钱包是⼀个安全的软件容器,⽤于存储身份验证和签名凭证。可能的钱包包括⽤于⽤户凭证的Oracle钱包,⽤于透明数据加密 (TDE) 的加密钱包和⽤于数据库备份云模块的Oracle公共云 (OPC )钱包。钱包是可选的,但建议使⽤。

•块更改跟踪⽂件:块更改跟踪通过将更改的块记录在块更改跟踪⽂件中,从⽽ 提⾼了增量备份的性能。在增量备份过程中,Oracle Recovery Manager (RMAN) ⽆需扫描所有数据块来确定哪些块已更改,⽽是使⽤此⽂件来标识需要备份的已更改块。块更改跟踪⽂件是可选的。

•闪回⽇志:闪回数据库在效果上类似于常规的时间点恢复。它使您可以将数据库⼀次恢复到近的状态。闪回数据库使⽤其⾃⼰的⽇志记录机制,创建闪回⽇志并将其存储在快速恢复区域中。仅当闪回⽇志可⽤时,才能使⽤闪回数据库。要利 ⽤此功能,必须预先设置数据库以创建闪回⽇志。闪回⽇志是可选的。

控制⽂件,联机重做⽇志⽂件和归档重做⽇志⽂件可以多路复⽤,这意味着可以 在单独的位置⾃动维护两个或多个相同的副本。

注意:更多详细信息,请看如下内容:Physical Storage Structures.

12

应⽤容器(Application Containers)

img

应⽤程序容器是⽤户创建的可选CDB组件,⽤于存储应⽤程序PDB的数据和元数据。CDB可以包含零个或多个应⽤程序容器。⼀个应⽤程序容器仅由⼀个应⽤程序根⽬录和⼀个或多个应⽤程序PDB组成,它们插⼊CDB根⽬录中。应⽤程序根⽬录属 于CDB根⽬录,不属于其他容器,并且存储公⽤的元数据和数据。

典型的应⽤程序将安装应⽤程序普通⽤户,元数据链接的公共对象和数据链接的公共对象。您可以在⼀个应⽤程序容器中创建多个与销售相关的PDB,这些PDB共享⼀个由⼀组公⽤表和表定义组成的应⽤程序后端。

应⽤程序根⽬录,应⽤程序种⼦和应⽤程序PDB都有⼀个SYSTEM,SYSAUX, TEMP,USERS和可选的UNDO表空间。每个表空间代表⼀个或多个数据⽂件。

注意:更多详细信息,请看如下内容:About Application Containers.

13

⾃动诊断资料库 (Automatic Diagnostic Repository) (ADR)

img

⾃动诊断存储库 (ADR) 是⽤于数据库诊断数据的系统范围的跟踪和⽇志记录中央存储库。它包括以下各项:

•后台跟踪⽂件:每个数据库后台进程都可以写⼊关联的跟踪⽂件。当进程检测 到内部错误时,该进程会将有关错误的信息转储到其跟踪⽂件中。写⼊跟踪⽂件的某些信息供数据库管理员使⽤,⽽其他信息则供Oracle⽀持服务使⽤。通 常,数据库后台进程跟踪⽂件名包含Oracle系统标识符 (SID),后台进程名和 操作系统进程号。⽤于RECO进程的跟踪⽂件的示例是 mytest_reco_10355.trc。

•前台跟踪⽂件:每个服务器进程都可以写⼊关联的跟踪⽂件。当进程检测到内 部错误时,该进程会将有关错误的信息转储到其跟踪⽂件中。服务器进程跟踪⽂件名包含Oracle SID,字符串ora和操作系统进程号。服务器进程跟踪⽂件名的示例是mytest_ora_10304.trc。

•转储⽂件:诊断转储⽂件是⼀种特殊的跟踪⽂件,其中包含有关状态或结构的详细时间点信息。转储⽂件通常是响应事件的诊断数据的⼀次性输出,⽽跟踪⽂件往往是诊断数据的连续输出。

•运⾏状况监视器报告:Oracle数据库包括⼀个称为运⾏状况监视器的框架,⽤ 于在数据库上运⾏诊断检查。运⾏状况检查可检测⽂件损坏,物理和逻辑块损 坏,撤消和重做损坏,数据字典损坏等。健康检查会⽣成有关其发现的报告, 并在许多情况下会提供解决问题的建议。

•事件包:对于将诊断数据上传到Oracle⽀持的⾃定义⽅法,您⾸先将数据收集 到称为事件包(包)的中间逻辑结构中。程序包是存储在ADR中的元数据的集合,并且指向诊断数据⽂件以及ADR内外的其他⽂件。创建程序包时,选择⼀ 个或多个问题以添加到程序包中。然后,⽀持⼯作台将与所选问题相关的问题 信息,事件信息和诊断数据(例如跟踪⽂件和转储)⾃动添加到程序包中。

•事件转储:发⽣事件时,数据库将⼀个或多个转储写⼊为事件创建的事件⽬录。事件转储还包含⽂件名中的事件编号。

•告警⽇志⽂件:数据库的告警⽇志是消息和错误的按时间先后顺序排列的⽇志。Oracle建议您定期查看告警⽇志。

注意:更多详细信息,请看如下内容:Automatic Diagnostic Repository.

14

备份⽂件 (Backup Files)

img

数据库备份可以是物理备份也可以是逻辑备份。

•物理备份是物理数据库⽂件的副本。您可以使⽤Recovery Manager (RMAN) 或操作系统实⽤程序进⾏物理备份。

•逻辑备份包含表,存储过程和其他逻辑数据。您可以使⽤Oracle数据库实⽤程序(如数据泵导出)提取逻辑数据,并将其存储在⼆进制⽂件中。逻辑备份可以补充物理备份。

RMAN创建的数据库备份存储为映像副本或备份集。

•映像副本是数据⽂件,控制⽂件或存档的重做⽇志⽂件的逐位磁盘复制。您可以使⽤操作系统实⽤程序或RMAN创建物理⽂件的映像副本,然后使⽤任⼀⼯具来还原它们。映像副本对磁盘很有⽤,因为您可以增量更新它们并就地恢复它们。

•备份集是RMAN创建的专有格式,其中包含⼀个或多个数据⽂件,已归档的重做⽇志⽂件,控制⽂件或服务器参数⽂件中的数据。备份集的⼩单位是⼀个称为备份⽂件的⼆进制⽂件。备份集是RMAN可以将备份写⼊顺序设备(例如磁带机)的唯⼀形式。备份集的优点之⼀是RMAN使⽤未使⽤的块压缩来节省备份数据⽂件的空间。备份集中仅包括数据⽂件中⽤于存储数据的那些块。备份集也可以被压缩,加密,发送到磁带,并使⽤数据⽂件副本不可⽤的⾼级未使⽤空间压缩。

RMAN可以与媒体管理库 (MML) ,系统备份到磁带 (SBT) 软件(可以创建到磁带 的备份),Oracle数据库备份云服务,或零数据丢失恢复设备交互(通常称为恢复设 备)。

注意:更多详细信息,请看如下内容:

Backup and Recovery

About Zero Data Loss Recovery Appliance

15

进程监控进程 (PMON)

img

进程监控进程 (PMON) 是⼀个后台进程,它定期扫描所有进程以查找任何异常死 亡的进程。然后,PMON负责协调由清理主进程 (CLMN) 和清理从属进程 (CLnn) 执⾏的清理。

PMON作为操作系统进程⽽不是线程运⾏。除数据库实例外,PMON还可以在Oracle⾃动存储管理 (ASM) 实例和Oracle ASM代理实例上运⾏。

注意:获得完整的进程列表,请看如下内容:Background Processes.

16

进程管理进程 (PMAN)

img

进程管理进程 (PMAN) 是⼀个后台进程,可根据需要监视,产⽣和停⽌以下各项:

•分派器和共享服务器进程

•数据库驻留连接池的连接代理和池化服务器进程

•作业队列流程

•可重启后台程序

PMAN作为操作系统进程⽽不是线程运⾏。除数据库实例外,PMAN还可以在Oracle⾃动存储管理 (ASM) 实例和Oracle ASM代理实例上运⾏。

注意:获得完整的进程列表,请看如下内容:Background Processes.

监听器注册进程 (LREG):Oracle 12c新特性--LREG进程专门负责注册实例服务

img

监听器注册进程 (LREG) 是⼀个后台过程,⽤于将实例,服务,处理程序和端点 通知给监听器。

LREG可以作为线程或操作系统进程运⾏。除了数据库实例之外,LREG还可以在Oracle⾃动存储管理 (ASM) 实例和Oracle Real Application Clusters (RAC) 上运⾏。

Oracle 12c引入了一些大量的新特性,数据库隐藏参数12.2比11.2就多了2000多个, 同时对之前版本的结构也发生了一些变化,虽然不如有些特性像temporary undo\immemory\多租户那么受人重视.如DB_WRITER_PROCESSES DBWR最大进程数从10GR2的20到11gr2的36再到12C R2的100,Archiver Process进程数也从10增加到了30, 还有本篇要讲的Listenr的注册进程的改变. 在12c以前的版本中服务注册一直都是PMON进程负责, 从12c起引入了LREG (listener registration)后台进程接管了这部分工作减轻PMON的工作,同样如果LREG 进程死了实例也会crash.

As with PMON in pre-12c versions, LREG (during registration) process provides the listener with information about the following:
* Names of the database services provided by the database
* Name of the database instance associated with the services and its current and maximum load
* Service handlers (dispatchers and dedicated servers) available for the instance, including their type, protocol addresses, and current and maximum load (for LBA)

listener没有启动LREG进程不能注册服务,LREG但是会每60秒尝试注册,如果local_listener没有配置,LREG会尝试连接默认的1521端口,直到监听进程启动, 如果Listener启动后LREG周期注册前,同样也可以使用”alter system register”立即注册服务.litener的注册信息可以使用listener_registration event dump在lreg trace中.

Which statement is true about Oracle Net Listener?

A. It acts as the listening endpoint for the Oracle database instance for all local and nonlocal user connections.

B. A single listener can service only one database instance and multiple remote client connections.

C. Service registration with the listener is performed by the process monitor (LREG) process of each database instance.

D. The listener.ora configuration file must be configured with one or more listening protocol addresses to allow remote users to connect to a database instance.

E. The listener.ora configuration file must be located in the ORACLE_HOME/network/admin directly.

【题意简述】

考察了Oracle 12c新特性——LREG进程负责监听器的注册(Listener Registration)。

【考点分析】

本人提供Oracle、MySQL、PG等数据库的培训和考证业务,私聊QQ646634621或微信db_bao,谢谢!

Oracle监听器 Net Listener 是一个重要的数据库服务器组件,在整个 Oracle 体系结构中,扮演着重要的作用。它负责管理Oracle 数据库和客户端之间的通讯,它在一个特定的网卡端口 (默认是TCP 1521端口)上监听连接请求,并将连接转发给数据库。

Oracle监听器主要负责下面的几方面功能:

l 监听客户端请求。

l 为客户端请求分配 Server Process

l 注册实例服务

l 错误转移 failover

l 负载均衡

其中,failover和负载均衡都是RAC架构下的功能。

本质上讲,Listener是建立实例和客户端进程之间联系的桥梁。 Listener 与实例之间的联系,就是通过注册的过程来实现的。注册的过程就是实例告诉监听器,它的数据库实例名称instance_name和服务名 service_names。监听器注册上这样的信息,对客户端请求根据监听的注册信息,找到正确的服务实例名称。目前 Oracle提供动态注册和静态注册两种方式。

静态注册就是实例启动时读取 listener.ora 文件的配置,将实例和服务注册到监听程序。无论何时启动一个数据库,默认地都有两条信息注册到监听器中:数据库服务器对应的实例和服务。

动态注册的动作是监听器所在主机上数据库实例完成。实例的后台进程每隔一段时间就会将实例的参 数信息注册到监听器上,实现动态注册。

大家都知道,在Oracle Database 11g以及之前版本,PMON进程负责注册实例服务。而在Oracle Database 12c中,大量新的后台进程被引入进来,其中就包括专门负责注册实例服务的LREG后台进程。

我们节选官方文档中关于PMON 和LREG 的定义,其中专门提到了12c 和之前版本的区别:

……

Process Monitor Process (PMON)

The process monitor (PMON) monitors the other background processes and performs process recovery when a server or dispatcher process terminates abnormally.

PMON is responsible for cleaning up the database buffer cache and freeing resources that the client process was using. For example, PMON resets the status of the active , releases locks that are no longer required, and removes the process ID from the list of active processes.

Listener Registration Process (LREG)

The registers information about the database instance and dispatcher processes with the Oracle Net Listener. When an instance starts, LREG polls the listener to determine whether it is running. If the listener is running, then LREG passes it relevant parameters. If it is not running, then LREG periodically attempts to contact it.

Note:

In releases before Oracle Database 12c, PMON performed the listener registration.

……

【答案剖析】

A, 监听器负责监听非本地用户的连接请求。例如我们熟知的sqlplus / as sysdba 命令是操作系统用户验证登录方式,通过OS本地的IPC可以直接连接到实例,而IPC由本地OS提供,允许各种进程在主机内进行通信,所以不需要listener也可以连接到实例。所以A错误。

B, 监听器运行在数据库服务器之上,可以与一个 或多个 Oracle 实例相关联,所以 B 错误

C, 本质上讲,Listener 是建立实例和客户端进程之间联系的桥梁。 Listener 与实例之间的联系,就是通过注册的过程来实现的。从12c 版本开始,LREG 后台进程负责注册实例服务。所以C正确。

D, 在配置listener.ora时会遇到Host参数,该参数作用就是指定连接的主机地址。我们可以选择IP地址和主机服务器名称。两种方法下,Oracle监听器是采用不同的策略方法。当使用HOST主机名的时候,Oracle监听器会对该计算机上所有的IP地址开启监听动作;如果使用IP地址,监听程序只能监听对应的IP地址。所以D错误。

E, 默认情况下,listener.ora 配置文件存放在ORACLE_HOME/network/admin目录下,但是我们可以修改配置文件的存放路径。以Windows环境为例,我们可以通过定义TNS_ADMIN环境变量来指定listener.ora、tnsnames.ora等配置文件的默认存放路径。所以E错误。

【答案】C

18

系统监控进程 (SMON)

img

系统监视器进程 (SMON) 是后台进程,它执⾏许多数据库维护任务,其中包括:

•创建和管理临时表空间元数据,并回收孤⽴的临时段使⽤的空间

•通过基于Undo表空间使⽤情况统计信息来对undo段进⾏上线,下线和收缩来 维护undo表空间

•处于暂时和不⼀致状态时清理数据字典

•维护系统更改号(SCN)到时间的映射表,⽤于⽀持Oracle闪回功能

SMON对后台活动期间引发的内部和外部错误可迅速恢复。SMON可以作为线程或操作系统进程运⾏。在Oracle Real Application Clusters (RAC) 数据库中,⼀个实例的SMON进程可以对失败的其他实例执⾏实例恢复。

注意:获得完整的进程列表,请看如下内容:Background Processes.

19

数据库写⼊进程 (DBWn)

img

数据库写⼊进程(DBWn)是⼀个后台进程,主要将数据块写⼊磁盘。它还处理检查点,⽂件打开同步,以及记录块写⼊记录。配置闪存后,DBWn还将写⼊数据库智能闪存 (闪存) 缓冲区。

在许多情况下,DBWn写⼊的块分散在整个磁盘上。因此,写操作往往⽐⽇志写 程序 (LGWR) 执⾏的顺序写要慢。如果可能,DBWn将执⾏多块写⼊,以提⾼效率。多块写⼊中写⼊的块数因操作系统⽽异。

DB_WRITER_PROCESSES初始化参数指定数据库写⼊进程的数量。可能有1到 100个数据库写⼊进程。前36个数据库写⼊进程的名称为DBW0-DBW9和DBWaDBWz。第37⾄第100个数据库写⼊器进程的名称是BW36-BW99。数据库为DB_WRITER_PROCESSES参数选择适当的默认设置,或者根据CPU和处理器组的数量来调整⽤户指定的设置。

注意:获得完整的进程列表,请看如下内容:Background Processes.

20

检查点进程 (CKPT)

img

检查点进程 (CKPT) 是⼀个后台进程,该进程在特定时间通过向数据库写⼊进程 (DBWn) 传递消息来启动检查点请求,以开始写⼊脏缓冲区。完成单个检查点请求后,CKPT会更新数据⽂件头和控制⽂件以记录新的检查点。

CKPT每三秒钟检查⼀次,以查看内存量是否超过了PGA_AGGREGATE_LIMIT初 始化参数的值,如果是,则采取措施。

CKPT可以作为线程或操作系统进程运⾏。除数据库实例外,CKPT还可以在 Oracle⾃动存储管理 (ASM) 实例上运⾏。

注意:获得完整的进程列表,请看如下内容:Background Processes.

21

可管理性监视进程 (MMON)和可管理性监视精简进程 (MMNL)

img

可管理性监视进程 (MMON) 和可管理性监视精简进程 (MMNL) 是后台进程,它们执⾏与⾃动⼯作负载存储库 (AWR) 相关的任务。AWR是历史性能数据的存储库, 其中包括系统,会话,单个SQL语句,段和服务的累积统计信息。它⽤于问题检测和 ⾃我调优。

MMON从SGA收集各种内存统计信息,对其进⾏过滤,然后每60分钟在⾃动⼯ 作负载存储库 (AWR) 中创建这些统计信息的快照。60分钟是默认值,可以更改。它还执⾏⾃动数据库诊断监视器 (ADDM) 分析,并为超出其阈值的指标发出警报。

MMNL收集 会话统计信息(例如⽤户ID,状态,主机以及它正在执⾏的SQL), 并将其存储在活动会话历史记录 (ASH) 缓冲区中。具体地说,MMNL每秒在SGA中对V $ SESSION和V $ SESSION_WAIT视图进⾏采样,然后将该数据记录在V $ ACTIVE_SESSION_HISTORY视图中。不采样⾮活动会话。ASH被设计为内存中的滚动缓冲区,因此,较早的信息将在需要时被覆盖。当ASH缓冲区已满或MMON拍摄快照时,MMNL将ASH缓冲区刷新(清空)到AWR的DBA_HIST_ACTIVE_SESS_HISTORY图中。由于空间昂贵,因此每10个条⽬中只有⼀个被刷新。MMNL还计算指标。

MMON和MMNL都可以作为线程或操作系统进程运⾏。除了数据库实例之外, MMON和MMNL还可以在⾃动存储管理(ASM)实例上运⾏。

注意:更多详细信息,请看如下内容:

Managing the SYSAUX Tablespace

Managing the Automatic Workload Repository

Active Session History Statistics

获得完整的进程列表,请看如下内容:Background Processes.

22

恢复进程 (RECO)

img

恢复进程 (RECO) 是⼀个后台进程,⽤于解决由于分布式数据库中的⽹络或系统 故障⽽导致挂起的分布式事务。

RECO可以作为线程或操作系统进程运⾏。

注意:获得完整的进程列表,请看如下内容:Background Processes.

23

⽇志写⼊进程 (LGWR)

img

⽇志写⼊进程(LGWR)是⼀个后台进程,可将重做⽇志条⽬顺序写⼊重做⽇志⽂件。重做⽇志条⽬在系统全局区域 (SGA) 的重做⽇志缓冲区中⽣成。如果数据库具 有多路复⽤的重做⽇志,则LGWR将相同的重做⽇志条⽬写⼊重做⽇志⽂件组的所有 成员。

LGWR处理速度⾮常快,必须被协同⼯作,并将操作委托给Log Writer Worker帮 助程序 (LGnn),这些程序可以从并发操作中受益,主要是将重做从⽇志缓冲区写⼊重做⽇志⽂件,并将写⼊完成的信息投送给正在等待的前台进程。

重做传输从属进程(TT00-zz)将⽇志从当前的联机和备⽤重做⽇志发送到配置为异步 (ASYNC) ⽇志传输的远程备⽤⽬的地。

LGWR可以作为线程或操作系统进程运⾏。除数据库实例外,LGWR还可以在Oracle ASM实例上运⾏。Oracle Real Application Clusters (RAC) 配置中的每个数据库实例都有其⾃⼰的重做⽇志⽂件集。

24

归档进程 (ARCn)

img

归档进程 (ARCn) 是后台进程,仅当数据库处于ARCHIVELOG模式并启⽤⾃动归档时才存在,在这种情况下ARCn会⾃动归档联机重做⽇志⽂件。⽇志写⼊进程 (LGWR) 在归档之前不能重⽤和覆盖联机重做⽇志⽂件组。

数据库将根据需要启动多个归档程序进程,以确保已填充的联机重做⽇志的归档不会落后。可能的过程包括 ARC0-ARC9 和 ARCa-ARCt(31个可能的⽬的地)。

LOG_ARCHIVE_MAX_PROCESSES初始化参数指定数据库初调⽤的ARCn进程数。如果您预计归档⼯作量很⼤,例如在批量加载数据期间,则可以增加归档进程的⼤数量。归档进程也可以有多个归档⽇志⽬的地。建议每个⽬的地⾄少有⼀个归档进程。

ARCn可以作为线程或操作系统进程运⾏。

注意:获得完整的进程列表,请看如下内容:Background Processes.

25

作业队列协调进程 (CJQ0)

img

作业队列协调器进程 (CJQ0) 是⼀个后台进程,它从数据字典中选择需要运⾏的作业,并⽣成作业队列从属进程 (Jnnn) 来运⾏这些作业。Oracle Scheduler会根据需要⾃动启动和停⽌CJQ0。JOB_QUEUE_PROCESSES初始化参数指定可以为执⾏作业创建的⼤进程数。CJQ0仅启动要运⾏的作业数量和可⽤资源所需数量的作业队列进程。

作业队列从属进程 (Jnnn) 执⾏作业协调分配的作业。选择作业进⾏处理时,作业从属进程将执⾏以下操作:

•收集运⾏作业所需的所有元数据,例如:程序参数和权限信息。

•以作业的所有者身份启动数据库会话,启动事务,然后开始执⾏作业。

•作业完成后,从属进程将提交并结束事务。

•关闭会话。

完成⼯作后,从属进程将执⾏以下操作:

•重新安排作业(如果需要)

•更新作业表中的状态以反映作业是否已完成或计划再次运⾏

•在作业⽇志表中插⼊⼀个条⽬

•更新运⾏计数,并在必要时更新失败和重试计数

•清理

•寻找新⼯作(如果没有,则休眠)

CJQ0和Jnnn都可以作为线程或操作系统进程运⾏。

注意:获得完整的进程列表,请看如下内容:Background Processes.

26

恢复写⼊进程 (RVWR)

img

Recovery Writer进程 (RVWR) 是⼀个后台进程,⽤于闪回整个数据库。也就是说,如果您具有必需的闪回⽇志,它将撤消从数据库当前状态到过去某个时间的事务。启⽤闪回或有保证的还原点时,RVWR将闪回数据写⼊快速恢复区域中的闪回数据库⽇志中。

RVWR可以作为线程或操作系统进程运⾏。

注意:获得完整的进程列表,请看如下内容:Background Processes.

27

闪回数据归档进程 (FBDA)

img

闪回数据存档进程 (FBDA) 是后台进程,提供了在表的整个⽣命周期内跟踪和存储表中事务性更改的功能。这样,您可以及时向后闪回表,以恢复表的状态。

提交修改跟踪表的事务时,FBDA会检查是否正在⽣成新的Undo,过滤与标记为存档的对象相关的内容,并将Undo信息复制到闪回数据存档表空间中。FBDA维护当前⾏上的元数据,并跟踪已存档的数据量。

FBDA还负责⾃动管理闪回数据存档的空间,组织(分区表空间)和保留时间。FBDA还跟踪已跟踪交易的归档进度。

FBDA可以作为线程或操作系统进程运⾏。

注意:获得完整的进程列表,请看如下内容:Background Processes.

28

空间管理协调进程 (SMCO)

img

空间管理协调进程 (SMCO) 是⼀个后台进程,⽤于调度各种空间管理任务的执⾏,包括主动空间分配和空间回收。SMCO动态产⽣空间管理从属进程 (Wnnn) 来实现这些任务。请注意,内存中协调进程 (IMCO) 是启动后台填充和重新填充列数据的后台进程。

Wnnn从属进程代表空间管理和Oracle的In-Memory选项执⾏⼯作。

•Wnnn进程是由SMCO动态⽣成的从属进程,⽤于在后台执⾏空间管理任务。这些任务包括根据空间使⽤量增⻓分析将空间预分配到本地管理的表空间和 SecureFiles段中,以及从删除的段中回收空间。这些任务还包括快速摄取延迟插⼊。启动后,从属进程将充当⾃治代理。完成任务执⾏后,它将⾃动从队列中拾取另⼀个任务。该进程在⻓时间闲置后会⾃⾏终⽌。

•Wnnn进程填充并重新填充启⽤In-Memory功能的对象。内存中协调进程 (IMCO) 会启动后台填充和重新填充柱状数据。IMCO后台进程和前台进程将 利⽤Wnnn从属进程进⾏填充和再填充。IMCO使⽤Wnnn进程预填充优先级为 LOW/MEDIUM/HIGH/CRITICAL的启⽤In-Memory的对象,并重新填充InMemory的对象。Wnnn从属进程上运⾏的内存填充和重新填充任务也从前台进程启动,以响应引⽤了启⽤In-Memory对象的查询和DML操作。

SMCO和Wnnn都可以作为线程或操作系统进程运⾏。

注意:获得完整的进程列表,请看如下内容:Background Processes.

29

分派进程 (Dnnn) 和 共享服务器进程 (Snnn)

img

在共享服务器体系结构中,客户端连接到分派进程 (Dnnn),该进程为每个连接创建虚电路。当客户端将数据发送到服务器时,分派进程将数据接收到虚电路中,并将 活动电路放置在公共队列中,以由空闲的共享服务器进程 (Snnn) 进⾏处理。然后,Snnn从虚电路读取数据并执⾏完成请求所需的数据库⼯作。当Snnn必须将数据发送到客户端时,Snnn将数据写回到虚电路中,⽽Dnnn会将数据发送到客户端。Snnn完成客户端请求后,它将虚电路释放回Dnnn,并可以⾃由处理其他客户端。

Snnn和Dnnn都可以作为线程或操作系统进程运⾏。除数据库实例外,Dnnn还在共享服务器上运⾏。

其它

在Oracle Database 12c中,大量新的后台进程被引入进来,很多新特性的实现都和新的进程有关。如:

  1. Oracle 12c实现了多LGWR管理,这就引入了LG00-LG99一系列的后台进程;
  2. Oracle 12c扩展了多DBWR支持,BW36~BW99,这一列进程都会提高DBWR的写并行;
  3. Oracle 12c的多进程多线程模式 - MPMT,引入SCMN进程作为线程监听进程;

下表对这些进程做了一定的梳理和说明,供大家参考。

进程名全名简要描述详细描述组件范畴
AQPCAQ Process CoordinatorPer instance AQ global coordinatorAQPC is responsible for performing administrative tasks for AQ Master Class Processes including commands like starting, stopping, and other administrative tasks. This process is automatically started on instance startup.Database instances Advanced Queueing
ARSnASM Recovery Slave Process(进程范围 ARS0-ARS9)Recovers ASM transactional operationsThe ASM RBAL background process coordinates and spawns one or more of these slave processes to recover aborted ASM transactional operations. These processes run only in the Oracle ASM instance.Oracle ASM instances
BWnnDatabase Writer ProcessWrites modified blocks from the database buffer cache to the data filesSee the Long Description for the DBWn process in this table for more information about the BWnn process.Database instances
FENCFence Monitor ProcessProcesses fence requests for RDBMS instances which are using Oracle ASM instancesCSS monitors RDBMS instances which are connected to the Oracle ASM instance and constantly doing I/Os. When the RDBMS instance terminates due to a failure, all the outstanding I/O's from the RDBMS instance should be drained and any new I/O's rejected. FENC receives and processes the fence request from CSSD.Oracle ASM instances
GCRnGlobal Conflict Resolution Slave ProcessPerforms synchronous tasks on behalf of LMHBGCRn processes are transient slaves that are started and stopped as required by LMHB to perform synchronous or resource intensive tasks.Database instances, Oracle ASM instances, Oracle RAC
IPC0IPC Service Background ProcessCommon background server for basic messaging and RDMA primitives based on IPC (Inter-process communication) methods.IPC0 handles very high rates of incoming connect requests, as well as, completing reconfigurations to support basic messaging and RDMA primitives over several transports such as UDP, RDS, InfiniBand and RC.Oracle RAC
LDDnGlobal Enqueue Service Daemon Helper SlaveHelps the LMDn processes with various tasksLDDn processes are slave processes spawned on demand by LMDn processes. They are spawned to help the dedicated LMDn processes with various tasks when certain workloads start creating performance bottlenecks. These slave processes are transient as they are started on demand and they can be shutdown when no longer needed. There can be up to 36 of these slave processes (LDD0-LDDz).Database instances, Oracle ASM instances, Oracle RAC
LGnnLog Writer WorkerWrites redo logOn multiprocessor systems, LGWR creates worker processes to improve the performance of writing to the redo log. LGWR workers are not used when there is a SYNC standby destination. Possible processes include LG00-LG99.Database instances
LREGListener Registration ProcessRegisters the instance with the listenersLREG notifies the listeners about instances, services, handlers, and endpoint.Database instances, Oracle ASM instances, Oracle RAC
OFSDOracle File Server Background ProcessServes file system requests submitted to an Oracle instanceThis background process listens for new file system requests, both management (like mount, unmount, and export) and I/O requests, and executes them using Oracle threads.Database instances, Oracle RAC
QMnnAQ Master Class ProcessPer instance per AQ Master Class ProcessEach of this type of process represents a single class of work item such as AQ notification, queue monitors, and cross process.Database instances Advanced Queueing
RMRAT Masking Slave ProcessExtracts and masks bind values from workloads like SQL tuning sets and DB Replay capture filesThis background process is used with Data Masking and Real Application Testing.Database instances
RMONRolling Migration Monitor ProcessManages the rolling migration procedure for an Oracle ASM clusterThe RMON process is spawned on demand to run the protocol for transitioning an ASM cluster in and out of rolling migration mode.Oracle ASM instance, Oracle RAC
RPOPInstant Recovery Repopulation DaemonResponsible for re-creating and/or repopulating data files from snapshot files and backup filesThe RPOP process is responsible for re-creating and repopulating data files from snapshots files. It works with the instant recovery feature to ensure immediate data file access. The local instance has immediate access to the remote snapshot file's data, while repopulation of the recovered primary data files happens concurrently. Any changes in the data are managed between the instance's DBW processes and RPOP to ensure the latest copy of the data is returned to the user.Database instances
SAnnSGA Allocator(SA00 ~ SAzz)Allocates SGAA small fraction of SGA is allocated during instance startup. The SAnn process allocates the rest of SGA in small chunks. The process exits upon completion of SGA allocation.Database instances
SCCnASM Disk Scrubbing Slave Check ProcessPerforms Oracle ASM disk scrubbing check operationSCCn acts as a slave process for SCRB and performs the checking operations. The possible processes are SCC0-SCC9.Oracle ASM instances
SCRBASM Disk Scrubbing Master ProcessCoordinates Oracle ASM disk scrubbing operationsSCRB runs in an Oracle ASM instance and coordinates Oracle ASM disk scrubbing operations.Oracle ASM instances
SCRnASM Disk Scrubbing Slave Repair ProcessPerforms Oracle ASM disk scrubbing repair operationSCRn acts as a slave process for SCRB and performs the repairing operations. The possible processes are SCR0-SCR9.Oracle ASM instances
SCVnASM Disk Scrubbing Slave Verify ProcessPerforms Oracle ASM disk scrubbing verify operationSCVn acts as a slave process for SCRB and performs the verifying operations. The possible processes are SCV0-SCV9.Oracle ASM instances
TTnnRedo Transport Slave ProcessShips redo from current online and standby redo logs to remote standby destinations configured for ASYNC transportTTnn can run as multiple processes, where nn is 00 to ZZ.Database instances, Data Guard
VUBGVolume drive Umbilicus BackgroundRelays messages between Oracle ASM instance and Oracle ASM Proxy instance that is used by ADVM (for ACFS)Oracle ASM instances, Oracle ASM Proxy instances

12c 新后台进程 (文档 ID 2102856.1)

Oracle 在线文档提供了完整的后台进程列表:
详细信息

  • BWnn 可以有1到100个数据库写进程。前36个数据库写进程是 DBW0-DBW9和DBWa-DBWz。第37到100个数据库写进程是 BW36-BW99。数据库为 DB_WRITER_PROCESSES 参数选择一个恰当的默认配置或者基于 CPU 和处理器组的个数调整用户指定的配置。
  • FENC (Fence Monitor Process) 为使用 Oracle ASM 实例的 RDBMS 实例处理 fence 请求。
  • IPC0 (IPC Service Background Process) 常见后台服务器的基本消息和基于 IPC (进程间通信)方式的 RDMA 原语。
  • LDDn (Global Enqueue Service Daemon Helper Slave) 帮助 LMDn 进程处理各种任务。
  • LGnn (Log Writer Worker) 在多处理器系统中,LGWR 创建工作进程来提高写重做日志的性能。当存在一个同步备用目的地的时候,不会使用 LGWR 工作进程。可能的进程包括 LG00-LG99。
    LREG (Listener Registration Process) 使用监听器注册实例。
    OFSD (Oracle File Server Background Process) 向 Oracle 实例提交文件系统请求服务。
  • RPOP (Instant Recovery Repopulation Daemon) 负责从快照和备份文件中重建 并且/或者 重新填充数据文件。
  • SAnn (SGA Allocator) 分配 SGA,SAnn 进程以块分配 SGA。该进程在 SGA 分配完成后退出。
  • SCRB (ASM Disk Scrubbing Master Process) 协调 Oracle ASM 磁盘清理操作。
  • SCRn (ASM Disk Scrubbing Slave Repair Process) 执行 Oracle ASM 磁盘清理修复操作。
  • SCVn (ASM Disk Scrubbing Slave Verify Process) 执行 Oracle ASM 磁盘清理验证操作。

11g进程

在Oracle Database 11g中,VKTM是一个新增的后台进程。这个进程的含义是:

VKTM (virtual keeper of time) is responsible for providing a wall-clock time (updated every second) and reference-time counter (updated every 20 ms and available only when running at elevated priority).

也就是说,这个进程用于提供一个数据库的时钟,每秒更新;或者作为参考时间计数器,这种方式每20毫秒更新一次,仅在高优先级时可用。

通过VKTM进程,数据库可以降低和操作系统的交互,Kamus的解释是:

在 11g之前所有的Oracle数据库后台或者前台进程如果需要获得当前时间信息,就需要调用操作系统的gettimeofday()函数或者说是相类似的 函数。而VKTM进程就是专门用来获得时间信息然后将信息存放在SGA中供其它进程使用,这样其它进程当需要时间信息的时候,只要到SGA的某个内存位置 去获得就好,而不用频繁调用gettimeofday()函数。毫无疑问,这样效率会更高。

在RAC测试中,Oracle 1.1.0.6版本LMSx进程获取时间信息时,可以从VKTM进程中获益大概70%的速度提升,而11.1.0.7将会更高。

同时,因为gettimeofday()函数也引发了很多bug,所以无论是RAC还是NORAC库,都将从VKTM进程中获益。

参考链接:
http://www.dbform.com/html/2008/504.html

Oracle的主要进程简要说明摘录如下:

NameExpanded NameShort DescriptionLong DescriptionExternal Properties
ABMRAuto BMR Background ProcessCoordinates execution of tasks such as filtering duplicate block media recovery requests and performing flood controlWhen a process submits a block media recovery request to ABMR, it dynamically spawns slave processes (BMRn) to perform. the recovery. ABMR and BMRn terminate after being idle for a long time.See Also: Oracle Database Backup and Recovery User's GuideDatabase instance
ACFSASM Cluster File System CSS ProcessTracks the cluster membership in CSS and informs the file system driver of membership changesACFS delivers CSS membership changes to the Oracle cluster file system. These membership changes are required for the file system to maintain file system consistency within the cluster.ASM instance, Oracle RAC
ACMSAtomic Control File to Memory Service ProcessCoordinates consistent updates to a control file resource with its SGA counterpart on all instances in an Oracle RAC environmentThe ACMS process works with a coordinating caller to ensure that an operation is executed on every instance in Oracle RAC despite failures. ACMS is the process in which a distributed operation is called. As a result, this process can exhibit a variety of behaviors. In general, ACMS is limited to small, nonblocking state changes for a limited set of cross-instance operations.Database instance, Oracle RAC
APnnLogical Standby / Streams Apply Process Coordinator ProcessObtains transactions from the reader server and passes them to apply serversThe coordinator process name is APnn, where nn can include letters and numbers.See Also: Oracle Streams Concepts and AdministrationDatabase instance, Data Guard, Oracle Streams
ARBnASM Rebalance ProcessRebalances data extents within an ASM disk groupPossible processes are ARB0-ARB9 and ARBA.ASM instance
ARCnArchiver ProcessCopies the redo log files to archival storage when they are full or an online redo log switch occursARCn processes exist only when the database is in ARCHIVELOG mode and automatic archiving is enabled, in which case ARCn automatically archives online redo log files. LGWR cannot reuse and overwrite an online redo log group until it has been archived.The database starts multiple archiver processes as needed to ensure that the archiving of filled online redo logs does not fall behind. Possible processes include ARC0-ARC9 and ARCa-ARCt.The LOG_ARCHIVE_MAX_PROCESSES initialization parameter specifies the number of ARCn processes that the database initially invokes.See Also: Oracle Database Concepts and Oracle Database Administrator's GuideDatabase instance
ASMBASM Background ProcessCommunicates with the ASM instance, managing storage and providing statisticsASMB runs in ASM instances when the ASMCMD cp command runs or when the database instance first starts if the server parameter file is stored in ASM. ASMB also runs with Oracle Cluster Registry on ASM.Database and ASM instances
ASnnLogical Standby / Streams Apply Process Reader Server or Apply ServerComputes dependencies between logical change records (LCRs) and assembles messages into transactions (Reader Server)Applies LCRs to database objects or passes LCRs and user messages to their appropriate apply handlers (Apply Server)When the reader server finishes computing dependencies between LCRs and assembling transactions, it returns the assembled transactions to the coordinator process. Query V$STREAMS_APPLY_READER for information about the reader server background process.An apply server receives the transactions from the coordinator background process, and either applies database changes in LCRs or sends LCRs or messages to apply handlers. Apply servers can also enqueue a queue. If an apply server encounters an error, then it then tries to resolve the error with a user-specified conflict handler or error handler. If an apply server cannot resolve an error, then it rolls back the transaction and places the entire transaction, including all of its messages, in the error queue. When an apply server commits a completed transaction, this transaction has been applied. When an apply server places a transaction in the error queue and commits, this transaction also has been applied. Query V$STREAMS_APPLY_SERVER for information about the apply server background process.The coordinator process name is ASnn, where nn can include letters and numbers.Database instance
BMRnAutomatic Block Media Recovery Slave Pool ProcessFetches blocks from a real-time readable standby databaseWhen a process submits a block media recovery request to ABMR, it dynamically spawns slave processes (BMRn) to perform. the recovery. BMRn processes fetch blocks from a real-time readable standby database. ABMR and BMRn terminate after being idle for a long time.See Also: Oracle Database Backup and Recovery User's GuideDatabase instance
BnnnASM Blocking Slave Process for GMONPerforms maintenance actions on ASM disk groupsBnnn performs actions that require waiting for resources on behalf of GMON. GMON must be highly available and cannot wait.A Bnnn slave is spawned when a disk is taken offline in an ASM disk group. Offline timer processing and drop of the disk are performed in this slave. Up to five process (B000 to B004) can exist depending on the load.ASM instance
CJQ0Job Queue Coordinator ProcessSelects jobs that need to be run from the data dictionary and spawns job queue slave processes (Jnnn) to run the jobsCJQ0 is automatically started and stopped as needed by Oracle Scheduler.The JOB_QUEUE_PROCESSES initialization parameter specifies the maximum number of processes that can be created for the execution of jobs. CJQ0 starts only as many job queue processes as required by the number of jobs to run and available resources.See Also: Oracle Database Concepts and Oracle Database Administrator's GuideDatabase instance
CKPTCheckpoint ProcessSignals DBWn at checkpoints and updates all the data files and control files of the database to indicate the most recent checkpointAt specific times CKPT starts a checkpoint request by messaging DBWn to begin writing dirty buffers. On completion of individual checkpoint requests, CKPT updates data file headers and control files to record most recent checkpoint.See Also: Oracle Database ConceptsDatabase and ASM instances
CPnnStreams Capture ProcessCaptures database changes from the redo log by using the infrastructure of LogMinerThe capture process name is CPnn, where nn can include letters and numbers. The underlying LogMiner process name is MSnn, where nn can include letters and numbers. The capture process includes one reader server that reads the redo log and divides it into regions, one or more preparer servers that scan the redo log, and one builder server that merges redo records from the preparer servers. Each reader server, preparer server, and builder server is a process. Query the V$STREAMS_CAPTURE view for information about this background process.See Also: Oracle Streams Concepts and AdministrationDatabase instance, Oracle Streams
CSnnStreams Propagation Sender ProcessSends LCRs to a propagation receiverThe propagation sender process name is CSnn, where nn can include letters and numbers. In an Oracle Streams combined capture and apply optimization, the propagation sender sends LCRs directly to the propagation receiver to improve performance. The propagation receiver passes the LCRs to an apply process. Query V$PROPAGATION_SENDER for information about a propagation sender.Database instance, Oracle Streams
CSnnI/O Calibration ProcessIssues I/Os to storage as part of storage calibration.CSnn slave processes are started on execution of the DBMS_RESOURCE_MANAGER.CALIBRATE_IO() procedure. There is one slave process per CPU on each node of the database.Database instance, Oracle RAC
CTWRChange Tracking Writer ProcessTracks changed data blocks as part of the Recovery Manager block change tracking featureCTWR tracks changed blocks as redo is generated at a primary database and as redo is applied at a standby database. The process is slightly different depending on the type of database.See Also: Oracle Database Backup and Recovery User's GuideDatabase instance
DBRMDatabase Resource Manager ProcessSets resource plans and performs other tasks related to the Database Resource ManagerIf a resource plan is not enabled, then this process is idle.See Also: Oracle Database Administrator's GuideDatabase instance
DBWnDatabase Writer ProcessWrites modified blocks from the database buffer cache to the data filesThe primary responsibility of DBWn is to write data blocks to disk. DBWn also handles checkpoints, file open synchronization, and logging of Block Written records.In many cases the blocks that DBWn writes are scattered throughout the disk. Thus, the writes tend to be slower than the sequential writes performed by LGWR. DBWn performs multiblock writes when possible to improve efficiency. The number of blocks written in a multiblock write varies by operating system.The DB_WRITER_PROCESSES initialization parameter specifies the number of DBWn processes (DBW0-DBW9 and DBWa-DBWz). The database selects an appropriate default setting for this parameter or adjusts a user-specified setting based on the number of CPUs and processor groups.See Also: Oracle Database Concepts and Oracle Database Performance Tuning GuideDatabase instance
DIA0Diagnostic ProcessDetects and resolves hangs and deadlocksASM and Database instances
DIAGDiagnostic Capture ProcessPerforms diagnostic dumpsDIAG performs diagnostic dumps requested by other processes and dumps triggered by process or instance termination. In Oracle RAC, DIAG performs global diagnostic dumps requested by remote instances.ASM and Database instances
DMnnData Pump Master ProcessCoordinates the Data Pump job tasks performed by Data Pump worker processes and handles client interactionsThe Data Pump master (control) process is started during job creation and coordinates all tasks performed by the Data Pump job. It handles all client interactions and communication, establishes all job contexts, and coordinates all worker process activities on behalf of the job.Database instance, Data Pump
DMONData Guard Broker Monitor ProcessManages and monitors a database that is part of a Data Guard broker configurationWhen you start the Data Guard broker, a DMON process is created. DMON runs for every database instance that is managed by the broker. DMON interacts with the local database and the DMON processes of the other databases to perform. the requested function. DMON also monitors the health of the broker configuration and ensures that every database has a consistent description of the configuration.DMON maintains profiles about all database objects in the broker configuration in a binary configuration file. A copy of this file is maintained by the DMON process for each of the databases that belong to the broker configuration. The process is created when the DG_BROKER_START initialization parameter is set to true.See Also: Oracle Data Guard BrokerDatabase instance, Data Guard
DnnnDispatcher ProcessPerforms network communication in the shared server architectureIn the shared server architecture, clients connect to a dispatcher process, which creates a virtual circuit for each connection. When the client sends data to the server, the dispatcher receives the data into the virtual circuit and places the active circuit on the common queue to be picked up by an idle shared server. The shared server then reads the data from the virtual circuit and performs the database work necessary to complete the request. When the shared server must send data to the client, the server writes the data back into the virtual circuit and the dispatcher sends the data to the client. After the shared server completes the client request, the server releases the virtual circuit back to the dispatcher and is free to handle other clients.Several initialization parameters relate to shared servers. The principal parameters are: DISPATCHERS, SHARED_SERVERS, MAX_SHARED_SERVERS, LOCAL_LISTENER, REMOTE_LISTENER.See Also: Oracle Database ConceptsDatabase instance, shared servers
DRnnASM Disk Resynchronization Slave ProcessResynchronizes the contents of an offline diskWhen a disk online SQL command is issued on a disk or disks that are offline, ASM spawns DRnn. Depending on the load, more than one slave may be spawned.ASM Instance
DSKMSlave Diskmon ProcessActs as the conduit between the database, ASM instances, and the Master Diskmon daemon to communicate information to Exadata storageThis process is active only if Exadata Storage is used. DSKM performs operations related to Exadata I/O fencing and Exadata cell failure handling.ASM instance, Exadata
DWnnData Pump Worker ProcessPerforms Data Pump tasks as assigned by the Data Pump master processThe Data Pump worker process is responsible for performing tasks that are assigned by the Data Pump master process, such as the loading and unloading of metadata and data.Database instance
EMNCEMON Coordinator ProcessCoordinates database event management and notificationsEMNC coordinates event management and notification activity in the database, including Streams Event Notifications, Continuous Query Notifications, and Fast Application Notifications.Database and ASM instances
EnnnEMON Slave ProcessPerforms database event management and notificationsThe database event management and notification load is distributed among the EMON slave processes. These processes work on the system notifications in parallel, offering a capability to process a larger volume of notifications, a faster response time, and a lower shared memory use for staging notifications.Database and ASM instances
FBDAFlashback Data Archiver ProcessArchives historical rows for tracked tables into flashback data archives and manages archive space, organization, and retentionWhen a transaction that modifies a tracked table commits, FBDA stores the pre-image of the rows in the archive. FDBA maintains metadata on the current rows and tracks how much data has been archived.FBDA is also responsible for automatically managing the flashback data archive for space, organization (partitioning tablespaces), and retention. FBDA also keeps track of how far the archiving of tracked transactions has progressed.See Also: Oracle Database Advanced Application Developer's GuideDatabase and ASM instances
FMONFile Mapping Monitor ProcessManages mapping information for the Oracle Database file mapping interfaceThe DBMS_STORAGE_MAP package enables you to control the mapping operations. When instructed by the user, FMON builds mapping information and stores it in the SGA, refreshes the information when a change occurs, saves the information to the data dictionary, and restores it to the SGA at instance startup.FMON is started by the database whenever the FILE_MAPPING initialization parameter is set to true.Database and ASM instances
FSFPData Guard Broker Fast Start Failover Pinger ProcessMaintains fast-start failover state between the primary and target standby databasesFSFP is created when fast-start failover is enabled.Database instance, Data Guard
GCRnFoot 1 Global Conflict Resolution Slave ProcessPerforms synchronous tasks on behalf of LMHBGCRn processes are transient slaves that are started and stopped as required by LMHB to perform. synchronous or resource intensive tasks.Database and ASM instances, Oracle RAC
GEN0General Task Execution ProcessPerforms required tasks including SQL and DMLDatabase and ASM instances
GMONASM Disk Group Monitor ProcessMonitors all mounted ASM disk groupsGMON monitors all the disk groups mounted in an ASM instance and is responsible for maintaining consistent disk membership and status information. Membership changes result from adding and dropping disks, whereas disk status changes result from taking disks offline or bringing them online.ASM instance
GTXnGlobal Transaction ProcessProvides transparent support for XA global transactions in an Oracle RAC environmentThese processes help maintain the global information about XA global transactions throughout the cluster. Also, the processes help perform. two-phase commit for global transactions anywhere in the cluster so that an Oracle RAC database behaves as a single system to the externally coordinated distributed transactions.The GLOBAL_TXN_PROCESSES initialization parameter specifies the number of GTXn processes, where n is 0-9 or a-j. The database automatically tunes the number of these processes based on the workload of XA global transactions. You can disable these processes by setting the parameter to 0. If you try to run XA global transactions with these process disabled, an error is returned.See Also: Oracle Real Application Clusters Administration and Deployment GuideDatabase instance, Oracle RAC
InnnDisk and Tape I/O Slave ProcessServes as an I/O slave process spawned on behalf of DBWR, LGWR, or an RMAN backup sessionI/O slave process can be configured on platforms where asynchronous I/O support is not available. These slaves are started by setting the corresponding slave enable parameter in the server parameter file. The I/O slaves simulate the asynchronous I/O behavior. when the underlying platform. does not have native support for asynchronous I/O.Database instance
INSVData Guard Broker Instance Slave ProcessPerforms Data Guard broker communication among instances in an Oracle RAC environmentINSV is created when the DG_BROKER_START initialization parameter is set to true.Database instance, Data Guard
JnnnJob Queue Slave ProcessExecutes jobs assigned by the job coordinatorJob slave processes are created or awakened by the job coordinator when it is time for a job to be executed.Job slaves gather all the metadata required to run the job from the data dictionary. The slave processes start a database session as the owner of the job, execute triggers, and then execute the job. After the job is complete, the slave processes commit and then execute appropriate triggers and close the session. The slave can repeat this operation in case additional jobs need to be run.Database instance
LCK0Instance Enqueue Background ProcessManages global enqueue requests and cross-instance broadcastsThe process handles all requests for resources other than data blocks. For examples, LCK0 manages library and row cache requests.Database and ASM instances, Oracle RAC
LGWRLog Writer ProcessWrites redo entries to the online redo logRedo log entries are generated in the redo log buffer of the system global area (SGA). LGWR writes the redo log entries sequentially into a redo log file. If the database has a multiplexed redo log, then LGWR writes the redo log entries to a group of redo log files.See Also: Oracle Database Concepts and Oracle Database Administrator's GuideDatabase and ASM instances
LMD0Global Enqueue Service Daemon 0 ProcessManages incoming remote resource requests from other instancesLMD0 processes enqueue resources managed under Global Enqueue Service. In particular, LMD0 processes incoming enqueue request messages and controls access to global enqueues. It also performs distributed deadlock detections.Database and ASM instances, Oracle RAC
LMHBGlobal Cache/Enqueue Service Heartbeat MonitorMonitor the heartbeat of LMON, LMD, and LMSn processesLMHB monitors LMON, LMD, and LMSn processes to ensure they are running normally without blocking or spinning.Database and ASM instances, Oracle RAC
LMONGlobal Enqueue Service Monitor ProcessMonitors an Oracle RAC cluster to manage global resourcesLMON maintains instance membership within Oracle RAC. The process detects instance transitions and performs reconfiguration of GES and GCS resources.See Also: Oracle Real Application Clusters Administration and Deployment GuideDatabase and ASM instances, Oracle RAC
LMSnGlobal Cache Service ProcessManages resources and provides resource control among Oracle RAC instancesLMS, where n is 0-9 or a-z, maintains a lock database for Global Cache Service (GCS) and buffer cache resources. This process receives, processes, and sends GCS requests, block transfers, and other GCS-related messages.See Also: Oracle Real Application Clusters Administration and Deployment GuideDatabase and ASM instances, Oracle RAC
LSP0Logical Standby Coordinator ProcessSchedules transactions for Data Guard SQL ApplyLSP0 is the initial process created upon startup of Data Guard SQL Apply. In addition to managing LogMiner and Apply processes, LSP0 is responsible for maintaining inter-transaction dependencies and appropriately scheduling transactions with applier processes. LSP0 is also responsible for detecting and enabling runtime parameter changes for the SQL Apply product as a whole.Database instance, Data Guard
LSP1Logical Standby Dictionary Build ProcessPerforms a logical standby dictionary build on a primary databaseThe LSP1 process is spawned on a logical standby database that is intended to become the new primary database. A logical standby database becomes a primary database by means of switchover or failover. The dictionary is necessary for logical standby databases to interpret the redo of the new primary database.Database instance, Data Guard
LSP2Logical Standby Set Guard ProcessDetermines which database objects will be protected by the database guardThe LSP2 process is created as needed during startup of SQL Apply to update the list of objects that are protected by the database guard.Database instance, Data Guard
LnnnPooled Server ProcessHandles client requests in Database Resident Connection PoolingIn Database Resident Connection Pooling, clients connect to a connection broker process. When a connection becomes active, the connection broker hands off the connection to a compatible pooled server process. The pooled server process performs network communication directly on the client connection and processes requests until the client releases the server. After being released, the connection is returned to the broker for monitoring, leaving the server free to handle other clients.See Also: Oracle Database ConceptsDatabase instance, Database Resident Connection Pooling
MARKMark AU for Resynchronization Coordinator ProcessMarks ASM allocation units as stale following a missed write to an offline diskMARK essentially tracks which extents require resynchronization for offline disks. This process runs in the database instance and is started when the database instance first begins using the ASM instance. If required, MARK can also be started on demand when disks go offline in the ASM redundancy disk group.Database and ASM instances
MMANMemory Manager ProcessServes as the instance memory managerThis process performs the resizing of memory components on the instance.Database and ASM instances
MMNLManageability Monitor Lite ProcessPerforms tasks relating to manageability, including active session history sampling and metrics computationMMNL performs many tasks relating to manageability, including session history capture and metrics computation.Database and ASM instances
MMONManageability Monitor ProcessPerforms or schedules many manageability tasksMMON performs many tasks related to manageability, including taking Automatic Workload Repository snapshots and performing Automatic Database Diagnostic Monitor analysis.Database and ASM instances
MnnnMMON Slave ProcessPerforms manageability tasks on behalf of MMONMnnn performs manageability tasks dispatched to them by MMON. Tasks performed include taking Automatic Workload Repository snapshots and Automatic Database Diagnostic Monitor analysis.Database and ASM instances
MRP0Managed Standby Recovery ProcessCoordinates the application of redo on a physical standby databaseMRP0 is spawned at the start of redo apply on a physical standby database. This process handles the extraction of redo and coordinates the application of that redo on a physical standby database.See Also: Oracle Data Guard Concepts and AdministrationDatabase instance, Data Guard
MSnnLogMiner Worker ProcessReads redo log files and translates and assembles into transactionsMultiple MSnn processes can exists, where n is 0-9 or a-Z. A minimum of three MSnn processes work as a group to provide transactions to a LogMiner client, for example, a logical standby database. There may be more than one such group, for example, Downstream Capture sessions.Database instance, Logical Standby, Oracle Streams
NnnnConnection Broker ProcessMonitors idle connections and hands off active connections in Database Resident Connection PoolingIn Database Resident Connection Pooling, clients connect to a connection broker process. When a connection becomes active, the connection broker hands off the connection to a compatible pooled server process. The pooled server process performs network communication directly on the client connection and processes requests until the client releases the server. After being released, the connection is returned to the broker for monitoring, leaving the server free to handle other clients.See Also: Oracle Database ConceptsDatabase instance, Database Resident Connection Pooling
NSAnRedo Transport NSA1 ProcessShips redo from current online redo logs to remote standby destinations configured for ASYNC transportNSAn can run as multiple processes, where n is 1-9 or A-V.See Also: Oracle Data Guard Concepts and AdministrationDatabase instance, Data Guard
NSSnRedo Transport NSS1 ProcessActs as a slave for LGWR when SYNC transport is configured for a remote standby destinationNSSn can run as multiple processes, where n is 1-9 or A-V.See Also: Oracle Data Guard Concepts and AdministrationDatabase instance, Data Guard
NSVnData Guard Broker NetSlave ProcessPerforms broker network communications between databases in a Data Guard environmentNSVn is created when a Data Guard broker configuration is enabled. There can be as many NSVn processes (where n is 0- 9 and A-U) created as there are databases in the Data Guard broker configuration.Database instance, Data Guard
OCFnASM CF Connection Pool ProcessMaintains a connection to the ASM instance for metadata operationsDatabase and ASM instances
OnnnASM Connection Pool ProcessMaintains a connection to the ASM instance for metadata operationsOnnn slave processes are spawned on demand. These processes communicate with the ASM instance.Database and ASM instances
PINGInterconnect Latency Measurement ProcessAssesses latencies associated with communications for each pair of cluster instancesEvery few seconds, the process in one instance sends messages to each instance. The message is received by PING on the target instance. The time for the round trip is measured and collected.Database and ASM instances, Oracle RAC
PMONProcess MonitorMonitors the other background processes and performs process recovery when a server or dispatcher process terminates abnormallyPMON periodically performs cleanup of all the following:Processes that died abnormallySessions that were killedDetached transactions that have exceeded their idle timeoutDetached network connections which have exceeded their idle timeoutIn addition, PMON monitors, spawns, and stops the following as needed:Dispatcher and shared server processesJob queue processesPooled server processes for database resident connection poolingRestartable background processesPMON is also responsible for registering information about the instance and dispatcher processes with the network listener.See Also: Oracle Database Concepts and Oracle Database Net Services Administrator's GuideDatabase and ASM instances
PnnnParallel Query Slave ProcessPerform. parallel execution of a SQL statement (query, DML, or DDL)Parallel Query has two components: a foreground process that acts as query coordinator and a set of parallel slaves (Pnnn) that are background processes. These background processes are spawned or reused during the start of a parallel statement. They receive and carry out units of work sent from the query coordinator.The maximum number of Pnnn processes is controlled by the initialization parameter PARALLEL_MAX_SERVERS. Slave processes are numbered from 0 to the PARALLEL_MAX_SERVERS setting. If the query is a GV$ query, then these background processes are numbered backward, starting from PZ99.Database and ASM instances
PRnnParallel Recovery ProcessPerforms tasks assigned by the coordinator process performing parallel recoveryPRnn serves as a slave process for the coordinator process performing parallel media recovery and carries out tasks assigned by the coordinator. The default number of these processes is based on number of CPUs.Database instance
PSP0Process Spawner ProcessSpawns Oracle background processes after initial instance startupDatabase and ASM instances
QMNCAQ Coordinator ProcessMonitors AQQMNC is responsible for facilitating various background activities required by AQ and Oracle Streams: time management of messages, management of nonpersistent queues, cleanup of resources, and so on. QMNC dynamically spawns Qnnn processes as needed for performing these tasks.Note that if the AQ_TM_PROCESSES initialization parameter is set to 0, this process will not start. The database writes the following message to the alert log: WARNING: AQ_TM_PROCESSES is set to 0. System might be adversely affected.Database instance, Advanced Queuing
QnnnAQ Server Class ProcessPerforms various AQ-related background task for QMNCQnnn acts as a slave process for QMNC and carry out tasks assigned by QMNC. The number of these processes is dynamically managed by QMNC based on load.Database instance
RBALASM Rebalance Master ProcessCoordinates rebalance activityIn an ASM instance, it coordinates rebalance activity for disk groups. In a database instances, it manages ASM disk groups.Database and ASM instances
RCBGResult Cache Background ProcessHandles result cache messagesThis process is used for handling invalidation and other messages generated by server processes attached to other instances in Oracle RAC.Database instance, Oracle RAC
RECORecoverer ProcessResolves distributed transactions that are pending because of a network or system failure in a distributed databaseRECO uses the information in the pending transaction table to finalize the status of in-doubt transactions. At timed intervals, the local RECO attempts to connect to remote databases and automatically complete the commit or rollback of the local portion of any pending distributed transactions. All transactions automatically resolved by RECO are removed from the pending transaction table.See Also: Oracle Database Concepts and Oracle Database Net Services Administrator's GuideDatabase instance
RMSnOracle RAC Management ProcessPerforms manageability tasks for Oracle RACRMSn performs a variety of tasks, including creating resources related to Oracle RAC when new instances are added to a cluster.See Also: Oracle Real Application Clusters Administration and Deployment GuideDatabase instance, Oracle RAC
RnnnASM Block Remap Slave ProcessRemaps a block with a read errorA database instance reading from an ASM disk group can encounter an error during a read. If possible, ASM asynchronously schedules a Rnnn slave process to remap this bad block from a mirror copy.ASM instance
RPnnCapture Processing Worker ProcessProcesses a set of workload capture filesRPnn are worker processes spawned by calling DBMS_WORKLOAD_REPLAY.PROCESS_CAPTURE(capture_dir,parallel_level). Each worker process is assigned a set of workload capture files to process.Worker processes execute in parallel without needing to communicate with each other. After each process is finished processing its assigned files, it exits and informs its parent process.The number of worker processes is controlled by the parallel_level parameter of DBMS_WORKLOAD_REPLAY.PROCESS_CAPTURE. By default, parallel_level is null. Then, the number of worker processes is computed as follows:SELECT VALUE FROM V$PARAMETER WHERE NAME='cpu_count'; When parallel_level is 1, no worker processes are spawned.Database instance
RSM0Data Guard Broker Worker ProcessPerforms monitoring management tasks related to Data Guard on behalf of DMONThe process is created when a Data Guard broker configuration is enabled.Database instance, Data Guard
RSMNRemote Slave Monitor ProcessManages background slave process creation and communication on remote instances in Oracle RACThis background process manages the creation of slave processes and the communication with their coordinators and peers. These background slave processes perform. tasks on behalf of a coordinating process running in another cluster instance.Database instance, Oracle RAC
RVWRRecovery Writer ProcessWrites flashback data to the flashback logs in the fast recovery areaRVWR writes flashback data from the flashback buffer in the SGA to the flashback logs. RVWR also creates flashback logs and performs some tasks for flashback log automatic management.Database instance, Flashback Database
SMCOSpace Management Coordinator ProcessCoordinates the execution of various space management tasksThis background process coordinates the execution of various space management tasks, including proactive space allocation and space reclamation. SMCO dynamically spawns slave processes (Wnnn) to implement these tasks.Database instance
SMONSystem Monitor ProcessPerforms critical tasks such as instance recovery and dead transaction recovery, and maintenance tasks such as temporary space reclamation, data dictionary cleanup, and undo tablespace managementSMON performs many database maintenance tasks, including the following:Creates and manages the temporary tablespace metadataReclaims space used by orphaned temporary segmentsMaintains the undo tablespace by onlining, offlining, and shrinking the undo segments based on undo space usage statisticsCleans up the data dictionary when it is in a transient and inconsistent stateMaintains the SCN to time mapping table used to support Oracle Flashback featuresIn an Oracle RAC database, the SMON process of one instance can perform. instance recovery for other instances that have failed.SMON is resilient to internal and external errors raised during background activities.See Also: Oracle Database ConceptsDatabase instance
SnnnShared Server ProcessHandles client requests in the shared server architectureIn the shared server architecture, clients connect to a dispatcher process, which creates a virtual circuit for each connection. When the client sends data to the server, the dispatcher receives the data into the virtual circuit and places the active circuit on the common queue to be picked up by an idle shared server. The shared server then reads the data from the virtual circuit and performs the database work necessary to complete the request. When the shared server must send data to the client, the server writes the data back into the virtual circuit and the dispatcher sends the data to the client. After the shared server completes the client request, the server releases the virtual circuit back to the dispatcher and is free to handle other clients.Several initialization parameters relate to shared servers. The principal parameters are: DISPATCHERS, SHARED_SERVERS, MAX_SHARED_SERVERS, LOCAL_LISTENER, REMOTE_LISTENER.See Also: Oracle Database ConceptsDatabase instance, shared servers
TEMnASM disk Test Error Emulation ProcessEmulates I/O errors on ASM disks through named eventsI/O errors can be emulated on ASM disk I/O through named events. The scope can be the process, instance, or even cluster. Optionally, a set of AUs can be chosen for error emulation.ASM instance
VBGnVolume Background ProcessCommunicates between the ASM instance and the operating system volume driverVBGn handles messages originating from the volume driver in the operating system and sends them to the ASM instance.VBGn can run as multiple processes, where n is 0-9.ASM instance
VDBGVolume Driver ProcessForwards ASM requests to perform. various volume-related tasksVDBG handles requests to lock or unlock an extent for rebalancing, volume resize, disk offline, add or drop a disk, force and dismount disk group to the Dynamic Volume Manager driver.ASM instance
VKRMVirtual Scheduler for Resource Manager ProcessServes as centralized scheduler for Resource Manager activityVKRM manages the CPU scheduling for all managed Oracle processes. The process schedules managed processes in accordance with an active resource plan.Database instance
VKTMVirtual Keeper of Time ProcessProvides a wall clock time and reference time for time interval measurementsVKTM acts as a time publisher for an Oracle instance. VKTM publishes two sets of time: a wall clock time using a seconds interval and a higher resolution time (which is not wall clock time) for interval measurements. The VKTM timer service centralizes time tracking and offloads multiple timer calls from other clients.Database and ASM instances
VMB0Volume Membership ProcessMaintains cluster membership on behalf of the ASM volume driverThis process membership in the cluster as an I/O-capable client on behalf of the ASM volume driver.ASM instance
VnnnASM Volume I/O Slave ProcessInitializes ASM volume contents during creationThis process is responsible for initializing the ASM volume during creation.ASM instance
WnnnSpace Management Slave ProcessPerforms various background space management tasks, including proactive space allocation and space reclamationWnnn processes are slave processes dynamically spawned by SMCO to perform. space management tasks in the background. These tasks include preallocating space into locally managed tablespace and SecureFiles segments based on space usage growth analysis, and reclaiming space from dropped segments. At most 10 Wnnn slaves can run on one database instance. After being started, the slave acts as an autonomous agent. After it finishes task execution, it automatically picks up another task from the queue. The process terminates itself after being idle for a long time.Database instance
XDMGExadata Automation ManagerInitiates automation tasks involved in managing Exadata storageXDMG monitors all configured Exadata cells for state changes, such as a bad disk getting replaced, and performs the required tasks for such events. Its primary tasks are to watch for inaccessible disks and cells and when they become accessible again, and to initiate the ASM ONLINE operation. The ONLINE operation is handled by XDWK.ASM instance, Exadata
XDWKExadata Automation ManagerPerforms automation tasks requested by XDMGXDWK gets started when asynchronous actions such as ONLINE, DROP, and ADD an ASM disk are requested by XDMG. After a 5 minute period of inactivity, this process will shut itself down.ASM instance, Exadata
XnnnASM Disk Expel Slave ProcessPerforms ASM post-rebalance activitiesThis process expels dropped disks at the end of an ASM rebalance.ASM instance

其它

请参考:http://blog.itpub.net/26736162/viewspace-2121305/



进程表现形式简介
SMON ( System Monitor Process , 系统监控进程 )ora_smon_ora11g主要用于清除失效的用户进程,释放用户进程所用的资源。具体有如下的功能: 1 、清除临时空间 2 、在系统启动时,完成系统实例恢复 3 、合并空闲空间 4 、从不可用的文件中恢复事务的活动 5 、 OPS 中失败节点的实例恢复 6 、清除 OBJ$ 表 7 、缩减回滚段 8 、使回滚段脱机
PMON ( Process Monitor Process , 进程监视进程 )ora_pmon_ora11g1 、在进程失败后执行清除工作:回滚事务、释放锁、释放其它资源 2 、注册数据库 3 、检测会话的空闲连接时间
CKPT ( Checkpoint Process ,检查点进程)ora_ckpt_ora11gCKPT 工作的主要条件如下: 1 、在日志切换的时候 2 、数据库用 IMMEDIATE 、 TRANSACTION 、 NORMAL 或选项 SHUTDOWN 数据库的时候 3 、根据初始化文件 LOG_CHECKPOINT_INTERVAL 、 LOG_CHECKPOINT_TIMEOUT 、 FAST_START_IO_TARGET 的设置的数值来确定
ARCn ( Archiver Process ,归档进程)ora_arc0_ora11g ora_arc1_ora11gARCn 的工作是当 LGWR 把 ONLINE REDO LOG 填满后, ARCn 把 REDO LOG FILE 的内容拷贝到其它地方。归档日志可以用来做 MEDIA RECOVERY 。 ONLINE REDO LOG 是被用来在实例失败的时候,恢复数据文件。而归档日志是被用来在 MEDIA RECOVERY 的时候,恢复数据文件
DBWn ( Database Writer Process ,数据库写进程)ora_dbw0_ora11gDBWn 负责把缓冲区的脏数据写到磁盘上。在 Oracle 发生 SWITCH LOG FILES的时候,会发生CHECKPOINT。CHECKPOINT发生后,在REDO LOG中的数据就可以被覆盖了。如果REDO LOG被填满,且要重新利用REDO LOG来存放新的数据时,而此时CHECKPOINT还未完成,那么Oracle就会返回“CHECKPOINT NOT COMPLETE”
LGWR ( Log Writer Process ,日志写进程)ora_lgwr_ora11gLGWR 是把 SGA 中 REDO LOG BUFFER 的信息写到 REDO 日志文件的进程。 LGWR 会在下面情况发生: 1 、用户发出提交命令( COMMIT ) 2 、每隔 3 秒 3 、重做日志缓冲区空间剩余不到 2/3 4 、重做日志缓冲区内的数据达到 1MB 5 、在发生联机重做日志切换( Log Switch )时 6 、在 DBWn 进程将修改的缓冲区写入磁盘时(如果相应的重做日志数据尚未写入磁盘)
CJQ ( Job Queue Coordinator Process ,作业调度器)ora_cjq0_ora11g负责将调度与执行系统中已定义好的 Job ,完成一些预定义的工作


进程表现形式简介
LMON ( Global Enqueue Service Monitor ,全局查询服务监视进程)oralmon raclhr2这个进程负责维护数据库集群层面的节点关系( Cluster Group Service , CGS ),并与其他实例的 LMON 进程定期进行心跳通信。当节点间出现了通信问题时,这个节点负责完成实例层面的重新配置( reconfiguration )和 GES 层面的实例恢复。当某一个(或多个)实例离开或加人数据库集群时,这个进程也负责完成实例层面的重新配置。每个数据库实例只会存在一个 LMON 进程。
LMSn ( Global Cache Service Process ,全局缓存服务进程)ora_lms0_raclhr2 ora_lms1_raclhr2是 Cache Fusion 的主要进程,负责数据块在实例间的传递,对应的服务叫作 GCS ( Global Cache Service )。这个进程的数量通过参数GCS_SERVER_PROCESSES来控制。
LMD ( Global Enqueue Service Daemon ,全局队列服务)ora_lmd0_raclhr2LMD 进程主要负责 GES 相关资源的管理工作, GES 资源主要是指 Oracle 中的排队( Enqueue )资源。由于 RAC 数据库包含很多实例,每个实例都能够对相同的数据进行操作,所以需要 LMD 进程对这些排队资源进行管理和协调。 LMD 进程默认的优先级并不是实时的,而且每个实例只包含一个 LMD 进程(名称为 1md0 )。
LCK ( Instance Enqueue Process ,实例队列进程)ora_lck0_raclhr2LCK 进程主要用来管理实例间资源请求和跨实例调用操作,调用操作包括数据字典等对像访问,并处理非 CACEH FUSION 的 CHACE 资源请求。每个实例默认情况下只包含一个LCK进程,进程名为lck0。
DIAG(Diagnostic Capture Process,诊断捕获进程)ora_diag_raclhr2负责转储( dump )数据库相关的诊断信息。当系统发现可能出现了性能问题时, DIAG 进程会响应其他进程发出的 dump 请求,将相关的诊断信息写到自己的跟踪日志文件( trace file) 中。另外当用户使用 oradebug 进行全局( global )级别的 dump 操作时,每个实例的 DIAG 进程都会将本地节点的诊断信息 dump 到自己的跟踪日志文件中。
LMHB( Global Cache/Enqueue Service Heartbeat Monitor ,全局缓存/队列服务心跳监控)ora_lmhb_raclhr2这个进程从 11gR2 版本开始出现,它的作用是监控 LMSn 、 LMD 、 LMON 、 LCK 等与 RAC 相关的主要后台进程,以便在它们出现问题时进行相应的操作。
[root@node1 .oracle]# ps -ef|grep oclskd grid 5614 1 0 20:51 ? 00:00:00 /u01/grid/bin/oclskd.bin root 5730 1 0 20:51 ? 00:00:00 /u01/grid/bin/oclskd.bin oracle 6641 1 0 20:52 ? 00:00:00 /u01/grid/bin/oclskd.bin


进程表现形式简介
RBAL ( ASM Rebalance Master Process , ASM 再平衡主进程)asmrbal+ASM ora_rbal_ora11g用于协调和管理磁盘组之间的动态平衡, RBAL 用来进行全局调用,以打开某个磁盘组内的磁盘。
ASMB ( ASM Background Process , ASM 后台进程)ora_asmb_ora11g oracle+ASM_asmb_ora11g (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))借助服务器进程建立普通 RDBMS 实例到 ASM 实例的会话,并传递磁盘文件的相关信息。每个数据库实例同时只能与一个 ASM 实例连接,因此数据库只会有一个 ASMB 后台进程。如一个节点上有多个数据库实例,它们只能共享一个 ASM 实例。 ASMB 进程与该节点的 CSS 守护进程进行通信,并接收来自 ASM 实例的文件区间映射信息。 ASMB 还负责为 ASM 实例提供 I/O 统计数据。
GMON ( ASM Disk Group Monitor Process ,磁盘组监控进程)asmgmon+ASM这个进程负责维护磁盘组中的各个磁盘状态的一致性。当磁盘组中的磁盘成员发生改变时(例如:添加、删除磁盘,或者磁盘出现故障),该进程负责离线( Offine )或者上线( Online )磁盘。可以说,这是 ASM 实例中最重要的后台进程之一。
ARBn ( ASM Rebalance Process , ASM 再平衡进程)asmarba+ASM在同一时刻可以存在许多此类进程,它们的名字分别为: ARB0 、 ARB1...ARBA ,以此类推,执行实际的重新平衡分配单元移动进程。
Onnn ( ASM Connection Pool Process , ASM 连接池进程)ora_o000_ora11g oracle+ASM_o000_ora11g (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))这组进程建立了与 ASM 实例的连接,某些长时间操作比如创建数据文件操作, RDBMS 会通过这些进程向 ASM 发送信息。

标签:

头像

小麦苗

学习或考证,均可联系麦老师,请加微信db_bao或QQ646634621

您可能还喜欢...

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

12 + 11 =

 

嘿,我是小麦,需要帮助随时找我哦
  • 18509239930
  • 个人微信

  • 麦老师QQ聊天
  • 个人邮箱
  • 点击加入QQ群
  • 个人微店

  • 回到顶部
返回顶部