Teradata Check Total Used Space, Total Maximum Space, Total Percent Used Space and Total Remaining Space

SELECT CAST(SUM(MaxPerm)/1024.00/1024.00/1024.00/1024.00 as DECIMAL (6,2)) as MaxPerm_TB, 

       CAST(SUM(CurrentPerm)/1024.00/1024.00/1024.00/1024.00 as DECIMAL (6,2)) Currentperm_TB, 

       CAST((SUM(MaxPerm)/1024.00/1024.00/1024.00/1024.00 -SUM(Currentperm)/1024.00/1024.00/1024.00/1024.00) as DECIMAL (6,2)) as Freeperm_TB,            

       CAST(((SUM (CurrentPerm (float)))/ NULLIFZERO (SUM(MaxPerm (float))) * 100.0) as DECIMAL (5,3)) as percent_used

       FROM DBC.DiskSpaceV;

 

MaxPerm_TB

Currentperm_TB

Freeperm_TB

percen_used

117.83

18.49

99.34

15.689


Comments