ITPub博客

首页 > 数据库 > Oracle > tem表空间使用情况查询脚本

tem表空间使用情况查询脚本

原创 Oracle 作者:xiaoqiang917 时间:2011-02-18 22:58:14 0 删除 编辑

应用升级的时候,用oem控制台看temp表空间已经满了。但是toad图形显示used为0%。

跑完下面的脚本让我更加相信toad啦~

[@more@]

The following are a few queries 
that can be used to list more meaningful information about the temporary segment usage:

This will give the "high water mark" of that temporary tablespace (= max used at one time):

select tablespace_name, sum(bytes_cached)/1024/1024 mb
from v$temp_extent_pool
group by tablespace_name;

This will give current usage:

select ss.tablespace_name,
sum((ss.used_blocks*ts.blocksize))/1024/1024 mb
from gv$sort_segment ss, sys.ts$ ts
where ss.tablespace_name = ts.name
group by ss.tablespace_name;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25274175/viewspace-1046174/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-02-18

  • 博文量
    11
  • 访问量
    10422