oracle数据库smon与pmon CHECKPOINT 功能的作用(ZT)

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:34

oracle数据库smon与pmon ckpt功能的作用

SMON是Oracle数据库至关重要的一个后台进程,SMON 是System Monitor 的缩写,意即:系统监控。
  在数据库启动过程中,SMON排在CKPT进程之后,在Oracle9i中排在第六号的位置:
  PMON started with pid=2
  DBW0 started with pid=3
  LGWR started with pid=4
  CKPT started with pid=5
  SMON started with pid=6
  RECO started with pid=7
  SMON负责系统监视已经一些系统清理及恢复工作,这些工作主要包括:
  

1.清理临时空间以及临时段
  SMON负责在数据库启动时清理临时表空间中的临时段,或者一些异常操作过程遗留下来的临时段,例如,当创建索引过程中,创建期间分配给索引的 Segment被标志为TEMPORARY,如果Create Index (或rebuild Index等)会话因某些原因异常中断,SMON负责清理这些临时段。
  

2.接合空闲空间
  在DMT(字典管理表空间)中,SMON负责把那些在表空间中空闲的并且互相是邻近的Extent接合成一个较大的空闲扩展区,这需要表空间的pctincrease设置为非零值。
  

3.执行实例恢复(Instance recovery)
  在实例恢复过程中,SMON的工作包括三个环节:应用Redo执行前滚、打开数据库提供访问、回滚未提交数据
  Tue Apr 22 21:31:10 http://www.google.cn/search?sbi=股票&q=股票&sbb=搜索&sa=搜索&client=pub-6430022987645146&forid=1&prog=aff&ie=GB2312&oe=GB2312&hl=zh-CN][color=#006699]2008
  SMON: enabling cache recovery
  Tue Apr 22 21:31:10 http://www.google.cn/search?sbi=股票&q=股票&sbb=搜索&sa=搜索&client=pub-6430022987645146&forid=1&prog=aff&ie=GB2312&oe=GB2312&hl=zh-CN][color=#006699]2008
  ARC0: Completed archiving log 1 thread 1 sequence 238
  Tue Apr 22 21:31:11 http://www.google.cn/search?sbi=股票&q=股票&sbb=搜索&sa=搜索&client=pub-6430022987645146&forid=1&prog=aff&ie=GB2312&oe=GB2312&hl=zh-CN][color=#006699]2008
  Undo Segment 1 Onlined
  Undo Segment 2 Onlined
  Undo Segment 3 Onlined
  Undo Segment 4 Onlined
  Undo Segment 5 Onlined
  Undo Segment 6 Onlined
  Undo Segment 7 Onlined
  Undo Segment 8 Onlined
  Undo Segment 9 Onlined
  Undo Segment 10 Onlined
  Successfully onlined Undo Tablespace 1.
  Tue Apr 22 21:31:11 http://www.google.cn/search?sbi=股票&q=股票&sbb=搜索&sa=搜索&client=pub-6430022987645146&forid=1&prog=aff&ie=GB2312&oe=GB2312&hl=zh-CN][color=#006699]2008
  SMON: enabling tx recovery
  Tue Apr 22 21:31:11 http://www.google.cn/search?sbi=股票&q=股票&sbb=搜索&sa=搜索&client=pub-6430022987645146&forid=1&prog=aff&ie=GB2312&oe=GB2312&hl=zh-CN][color=#006699]2008
  Database Characterset is ZHS16GBK
  replication_dependency_tracking turned off (no async multimaster replication found)
  Completed: ALTER DATABASE OPEN
  

4.离线(Offline)回滚段
  在自动回滚段管理(AUM)中负责Offline不再需要的回滚段,日志中会记录类似如下信息:
  Fri May 2 15:43:21 http://www.google.cn/search?sbi=股票&q=股票&sbb=搜索&sa=搜索&client=pub-6430022987645146&forid=1&prog=aff&ie=GB2312&oe=GB2312&hl=zh-CN][color=#006699]2008
  SMON offlining US=11
  SMON offlining US=12
  SMON offlining US=13
  SMON offlining US=14
  SMON offlining US=15
  SMON offlining US=16
  SMON offlining US=17
  SMON offlining US=18
  SMON offlining US=19
  SMON offlining US=20
  SMON offlining US=21
  SMON offlining US=22
  SMON offlining US=23
  

5.执行并行恢复
  以下信息来自9i日志:
  Fri May 11 21:30:45 http://www.google.cn/search?sbi=基金&q=基金&sbb=搜索&sa=搜索&client=pub-6430022987645146&forid=1&prog=aff&ie=GB2312&oe=GB2312&hl=zh-CN][color=#006699]2007
  SMON: Parallel transaction recovery tried
  Also Recordsome English Note About SMON:
  The SMON background process performs all http://www.alimama.com/membersvc/buyadzone/buy_ad_zone.htm?adzoneid=892989][color=#006699]system monitoring functions on the http://www.google.cn/search?sbi=股票&q=股票&sbb=搜索&sa=搜索&client=pub-6430022987645146&forid=1&prog=aff&ie=GB2312&oe=GB2312&hl=zh-CN][color=#006699]oracle database. The SMON process performs a "warm start" each time that http://www.google.cn/search?sbi=股票&q=股票&sbb=搜索&sa=搜索&client=pub-6430022987645146&forid=1&prog=aff&ie=GB2312&oe=GB2312&hl=zh-CN][color=#006699]oracle is re-started, ensuring that any in-flight transaction at the time of the last shutdown are recovered. For example, if http://www.google.cn/search?sbi=股票&q=股票&sbb=搜索&sa=搜索&client=pub-6430022987645146&forid=1&prog=aff&ie=GB2312&oe=GB2312&hl=zh-CN][color=#006699]oracle crashed hard with a power failure, the SMON process is attached at startup time, and detects any uncompleted work, using the rollback segments to recover the transactions. In addition,SMON performs periodic cleanup of temporary segments that are no longer needed, and also perform. tablespace operations, coalescing contiguous free extents into larger extents.

PROCESS MONITOR (PMON) 进程监控进程主要用于回滚异常终止的或被用户强制终止的事务.<1>.rolling back the transaction.<2>.releasing locks.释放锁.<3>.releasing other resources.<4>.restarts dead dispatchers.重启死掉的调度器.(在共享服务器中用).PMON (:Include in SGA)----------------------->PGA

CHECKPOINT (CKPT) 检查点进程用来在数据库里实现同步,实现之前会强制将脏数据从内在里写到物理文件里.<1>.会启动DBWn来写脏数据(SIGNALLING DBWn at CKPT.)<2>.完后会更新DATAFILE的HEADER和控制文件的HEADER.而HEADER中有同步所需要的信息,即CHECKPOINT的信息.<3>.在ORACLE中,正常情况下,所有文件必须同期性地同步;靠CHECKPOINT来完成.

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】