Returns summary of all data within SQL Server instance grouped by type. Tempdb database size excluded. Script can be handy during analyze of instance, disk drives sizing, memory sizing etc.
SELECT type_desc AS DataType, CONVERT(DECIMAL(10,2),(SUM(size * 8.00) / 1024.00 / 1024.00)) As UsedSpace FROM master.sys.master_files WHERE name NOT LIKE 'temp%' GROUP BY type_desc
Results
Script results screen:
Script results detailed description:
Column name | Data type | Description |
---|---|---|
DataType | nvarchar(60) | Description of the file type: ROWS LOG FILESTREAM FULLTEXT (Full-text catalogs earlier than SQL Server 2008.) |
UsedSpace | float | Space used by given data in GB. |