Tuesday, August 6, 2024

Database Size in SQL Server Management Studio

--List the size of all databases on the server

SELECT 

DB_NAME(database_id) AS DatabaseName,

    SUM(size * 8 / 1024) AS SizeMB

FROM sys.master_files

GROUP BY database_id;

No comments:

Post a Comment