Use DB_Name-- Mention database name to get the details go select name , filename, (growth/1024) as Growth_MB , convert(decimal(12,3),round(sf.size/128.00,2)) as FileSize_MB , convert(decimal(12,3),round(fileproperty(sf.name,'SpaceUsed')/128.00,2)) as SpaceUsed_MB , convert(decimal(12,3),round((sf.size-fileproperty(sf.name,'SpaceUsed'))/128.00,2)) as FreeSpace_MB from dbo.sysfiles sf
Thursday, 19 June 2025
DBA-Database mdf & ldf files size, used space, Free space in MB
Subscribe to:
Post Comments (Atom)
SQLDBA - Get Space Used by Tables and Indexes in SQL Server
Get Space Used by Tables and Indexes in SQL Server Databases can consume significant amounts of storage, so it’s important to understand ho...
-
Have your SQL queries been eating up CPU like it's a buffet? Then it’s time to talk about the most underrated setting in SQL Server: ...
-
Issue: The SQL Server service for our cluster could not be brought online during a recent failover due to registry not found error(s). How...
-
-- Health and status of WSFC cluster. These two queries work only if the WSFC has quorum SELECT * FROM sys.dm_hadr_cluster SELECT * FROM sy...
No comments:
Post a Comment