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

SELECT

CAST(SUM(CurrentPerm)/1024/1024/1024/1024 as DECIMAL (6,2)) AS USEDSPACE_IN_TB

,CAST(SUM(MaxPerm)/1024/1024/1024/1024 as DECIMAL (6,2)) AS MAXSPACE_IN_TB

,CAST(SUM(CurrentPerm)/ NULLIFZERO (SUM(MaxPerm)) *100 as DECIMAL (6,2)) (FORMAT 'zz9.99%'AS Percentage_Used

,CAST(MAXSPACE_IN_TB- USEDSPACE_IN_TB as DECIMAL (6,2)) AS REMAININGSPACE_IN_TB

FROM DBC.DiskSpace;

 

USEDSPACE_IN_TB

MAXSPACE_IN_TB

Percentage_Used

REMAININGSPACE_IN_TB

22.29

36.97

60.29

14.68


 

Comments