最近考ocp,有题目是关于pmon和smon的作用的。
好像知道的样子,但是又说不出来,看题目能选出选项,具体说不出作用,现总结一下,增强记忆。
官方文档:https://docs.oracle.com/en/database
1.PMON
1.1.(来自19c在线文档)
PMON periodically scans all processes to find any that have died abnormally. PMON is then responsible for coordinating cleanup performed by the CLMN process and the CLnn slaves.
PMON定期扫描所有进程,以查找非正常死亡的进程。然后PMON负责协调CLMN进程和CLnn从属进程执行的清理工作。
1.2.ORACLE CONCEPT中关于pmon的描述
Process Manager (PMAN)
Process Manager (PMAN) oversees several background processes including shared servers, pooled servers, and job queue processes.
PMAN monitors, spawns, and stops the following types of processes:
Dispatcher and shared server processes
Connection broker and pooled server processes for database resident connection pools
Job queue processes
Restartable background processes
进程管理器(PMAN)
Process Manager (PMAN)监视多个后台进程,包括共享服务器、池服务器和作业队列进程。
PMAN监视、生成和停止以下类型的进程:
调度程序和共享服务器进程
用于数据库驻留连接池的连接代理和池服务器进程
工作队列的过程
可重新开始的后台进程
2.SMON
2.1.smon(来自19c文档)
SMON performs many database maintenance tasks, including the following
*Creates and manages the temporary tablespace metadata
*Reclaims space used by orphaned temporary segments
*Maintains the undo tablespace by onlining, offlining, and shrinking the undo segments
*based on undo space usage statistics
*Cleans up the data dictionary when it is in a transient and inconsistent state
*Maintains the SCN to time mapping table used to support Oracle Flashback features
In an Oracle RAC database, the SMON process of one instance can perform instance recovery for other instances that have failed.
SMON执行许多数据库维护任务,包括以下任务
创建和管理临时表空间元数据
*回收孤儿临时段使用的空间
*通过联机、脱机和收缩撤消段来维护撤消表空间
*基于撤销空间使用统计
*在数据字典处于暂态和不一致状态时清除它
*维护用于支持Oracle闪回特性的SCN到时间映射表
在Oracle RAC数据库中,一个实例的SMON进程可以为其他失败的实例执行实例恢复。
2.2.ORACLE CONCEPT中关于smon的描述:
System Monitor Process (SMON)
The system monitor process (SMON) is in charge of a variety of system-level cleanup duties.
Duties assigned to SMON include:
Performing instance recovery, if necessary, at instance startup. In an Oracle RAC database, the SMON process of one database instance can perform instance recovery for a failed instance.
Recovering terminated transactions that were skipped during instance recovery because of file-read or tablespace offline errors. SMON recovers the transactions when the tablespace or file is brought back online.
Cleaning up unused temporary segments. For example, Oracle Database allocates extents when creating an index. If the operation fails, then SMON cleans up the temporary space.
Coalescing contiguous free extents within dictionary-managed tablespaces.
SMON checks regularly to see whether it is needed. Other processes can call SMON if they detect a need for it.
翻译如下:
系统监控进程(SMON)
系统监视器进程(SMON)负责各种系统级的清理任务。
分配给SMON的任务包括:
如果需要,在实例启动时执行实例恢复。在Oracle RAC数据库中,一个数据库实例的SMON进程可以对失败的实例执行实例恢复。
恢复在实例恢复期间由于文件读取或表空间脱机错误而跳过的已终止事务。当表空间或文件恢复联机时,SMON恢复事务。
清理未使用的临时段。例如,Oracle数据库在创建索引时分配区段。如果操作失败,那么SMON将清理临时空间。
在字典管理的表空间中合并相邻的空闲区。
SMON定期检查,看看是否需要它。如果其他进程检测到需要SMON,则可以调用它