大橙子网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

oracle表空间,临时表空间使用率查询

临时表空间:
SELECT a.tablespace_name, a.BYTES total, a.bytes - nvl(b.bytes, 0) free
  FROM (SELECT   tablespace_name, SUM (bytes) bytes FROM dba_temp_files GROUP BY tablespace_name) a,
       (SELECT   tablespace_name, SUM (bytes_cached) bytes FROM v$temp_extent_pool GROUP BY tablespace_name) b
WHERE a.tablespace_name = b.tablespace_name(+)

或者
select TABLESPACE_NAME, BYTES_USED/1024/1024 used_MB,BYTES_FREE/1024/1024 free_MB
from V$TEMP_SPACE_HEADER;

一般的表空间用如下即可:
Select a.Tablespace_Name, a.Total || 'M' Total_Space, (a.Total - b.Free) || 'M' Used_Space, To_Char((a.Total - b.Free) / a.Total * 100, '99.99') || '%' Pct_Free
From
(Select Tablespace_Name, Sum(Bytes) / 1024 / 1024 Total From Dba_Data_Files Group By tablespace_Name) a,
(Select Tablespace_Name, Sum(Bytes) / 1024 / 1024 Free From Dba_Free_Space Group By Tablespace_Name) b where a.Tablespace_Name = b.Tablespace_Name;


分享文章:oracle表空间,临时表空间使用率查询
本文链接:http://dzwzjz.com/article/gjjgii.html
在线咨询
服务热线
服务热线:028-86922220
TOP