26 July 2018        Add to Favorites   Report

Database size, used space and free space in a Teradata database

Purpose : find space used by Teradata database:

Solution:

SELECT 
DATABASENAME,
CAST(SUM(MAXPERM)/(1024*1024*1024) AS DECIMAL(7,2)) MAX_PERM,
CAST(SUM(CURRENTPERM)/(1024*1024*1024) AS DECIMAL(7,2)) CURRENT_PERM,
CAST(SUM(MAXSPOOL)/(1024*1024*1024) AS DECIMAL(7,2)) MAX_SPOOL,
CAST(SUM(CURRENTSPOOL)/(1024*1024*1024) AS DECIMAL(7,2)) CURRENT_SPOOL
FROM
DBC.DISKSPACE
WHERE DATABASENAME = 'YOURDATABASE'
GROUP BY
DATABASENAME ORDER BY MAX_PERM DESC;

Read great educational content like this and a lot more !

Members get free exclusive access to content, new courses, and discounts. Signup for a free account to write a post / comment / upvote posts. Creating an account takes less than 5 seconds and you can start earning badges & points too

Copied