Check database size and drive size in SQL Server

Check the size of databases in SQL Server

SELECT DB_NAME(database_id) AS DatabaseName,
 size * 8 / 1024 AS SizeMB
FROM sys.master_files

Check the data file size in SQL Server

SELECT DB_NAME(database_id) AS DatabaseName,physical_name,
 size * 8 / 1024 AS SizeMB
FROM sys.master_files

Monitor the disk space in SQL Server

EXEC xp_fixeddrives;
This entry was posted in MSSQLServer on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply