DSI405中关于smon和空间回收的内容
2016-07-07 17:27
393 查看
1.SMON Functions
SMON is implemented by ktmmon(). smon是用ktmmon()来实现的The main functions of SMON are:
Merging or coalescing free extents 联合、合并空闲区
Cleaning up temporary segments 清理临时段
Cleaning up nonexistent objects in OBJ$ 从obj$清理不存在的对象
Cleaning up IND$ if online builder crashes 如果在线建索引失败,清理ind$
Shrinking undo segments 收缩undo段
Transaction recovery on startup 数据库startup的时候做事务恢复
Transaction rollback (when posted by PMON) 事务回滚(通过pmon)
2.Coalescing Free Space
SMON performs tablespace coalescing every 5minutes. smon每5分钟执行表空间的合并It calls ktsclsb() to coalesce five groupsof extents. 调用ktsclsb()去合并5组区
The function merges extents insystem-managed tablespaces and where PCTINCREASE > 0 函数合并系统管理表空间并且pctincrease>0的表空间的区
The ST enqueue is held during each merge. 每次联合都需要持有ST队列(spacemanagement enqueue)
To identify if SMON has coalesced, thefollowing query displays a summary by tablespace: 查询smon是否执行了合并
SELECT count(*) FROMdba_free_space_coalesced;
3.Disabling Background Coalescing 禁止后台合并
Background coalescing should not be aproblem.It can be reduced by:
Using locally managed tablespaces 使用本地管理表空间
Setting PCTINCREASE to 0 as the default fortablespaces 设置表空间的pctincrease默认值为0
It can be disabled completely by settingevent 10269. 通过设置事件10269来禁止
4.Temporary Segment Cleanup 临时段的清理
SMON performs this task every two hours. smon每两个小时执行临时段的清理任务It calls the function ktssdt_segs() to dropall the stray temporary segments. 调用ktssdt_segs()去删除所有的零散的临时段
If many processes are aborted while holdingtemporary segments, then the work is considerable. 如果很多持有临时段的进程意外终止了,那么这个工作应该引起注意
The TS (temporary segment) enqueue isacquired each time SMON finds a segment to be dropped. 每次smon去查找需要删除的段时,都需要获得TS队列
To identify if SMON is doing the cleanup,check the number of temporary segments. 通过下面的查询,确定smon是否正在做清理,检查临时段的数量:
SELECT count(*) FROM dba_extents WHEREsegment_type = 'TEMPORARY';
5.Disabling Temporary Segment Cleanup 禁止临时段清理
Temporary segment cleanup should not be aproblem.It can be reduced by:
Using sort segments in temporarytablespaces 在临时表空间使用排序段
Encouraging users not to abort processes 鼓励用户不要是进程意外终止
It can be disabled completely by settingevent 10061. 设置事件10061去完全禁止
http://blog.csdn.net/nanaranran/article/details/51852622
相关文章推荐
- 基于 Red Hat 的发行版 Oracle Linux 正式发布Oracle Linux 7.1
- Oracle Containers for J2EE远程安全漏洞(CVE-2014-0413)
- Oracle 10g R2不能使用EM的问题
- 表空间操作
- PreparedStatement中in子句的处理
- VMware下RedHat4.8_64位安装Oracle 10g RAC--简略脚本
- oracle sql日期比较
- 基于 Red Hat 的发行版 Oracle Linux 正式发布Oracle Linux 7.1
- OS block size和Oracle block size,查找OS Blocksize的方法
- oracle中创建数据库和表空间的几点总结
- 数据库自动备份脚本
- oracle的nvl函数的使用介绍
- 解决oracle用户连接失败的解决方法
- oracle的一些tips技巧
- Oracle 下的开发日积月累
- Oracle存储过程之数据库中获取数据实例
- Windows下ORACLE 10g完全卸载的方法分析
- Oracle 函数大全[字符串函数,数学函数,日期函数]第1/4页
- ORACLE LATERAL-SQL-INJECTION 个人见解