普通表空间:
Select a.Tablespace_Name, Total, Free, Total - Free Used
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;
临时表空间:
Select a.Tablespace_Name,
Sum(b.Bytes) / 1024 / 1024 As Toal_Size,
Sum(a.Free_Space) / 1024 / 1024 As Free_Size,
Sum(b.Bytes) / 1024 / 1024 - Sum(a.Free_Space) / 1024 / 1024 As Used_Size
From Dba_Temp_Free_Space a, Dba_Temp_Files b
Where a.Tablespace_Name = b.Tablespace_Name
Group By a.Tablespace_Name
阅读(8653) | 评论(0) | 转发(0) |