永发信息网

oracle 9i 查询临时表空间占用率的sql,最好能和oem统计出来的结果一致!

答案:2  悬赏:20  手机版
解决时间 2021-03-01 02:31
  • 提问者网友:浮克旳回音
  • 2021-02-28 07:16
oracle 9i 查询临时表空间占用率的sql,最好能和oem统计出来的结果一致!
最佳答案
  • 五星知识达人网友:梦中风几里
  • 2021-02-28 08:33
SELECt a.tablespace_name,

TO_CHAr(NVL(b.bytes / 1024 / 1024, 0),'99,999,990.900') "Size (M)",

TO_CHAr(NVL(c.used_bytes /1024/1024, 0),'99999999.999') "Using (M)",

TO_CHAr(NVL(c.used_bytes / b.bytes * 100, 0), '990.00') "Using %"

FROM dba_tablespaces a,

(select tablespace_name, sum(bytes) bytes from dba_temp_files group by tablespace_name) b,

(select tablespace_name, sum(bytes_used) used_bytes from v$temp_extent_pool group by tablespace_name) c

WHERe a.tablespace_name = b.tablespace_name(+)

AND a.tablespace_name = c.tablespace_name(+)
AND a.contents = 'TEMPORARY'
全部回答
  • 1楼网友:污到你湿
  • 2021-02-28 09:22
oracle 查询最近执行过的 sql语句 select sql_text,last_load_time from v$sql order by last_load_time desc; select sql_text, last_load_time from v$sql where last_load_time is not null and sql_text like 'select%' order by last_load_time desc; select sql_text, last_load_time from v$sql where last_load_time is not null and sql_text like 'update%' order by last_load_time desc; select sql_text, last_load_time from v$sql where last_load_time is not null and last_load_time like' 14-06-09%' order by last_load_time desc;
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯