New answers tagged


To avoid CROSS APPLY the simplest way I can think of is to call sys.dm_os_volume_stats with explicit parameters for database_id and file_id. This means executing a single-row result for every db/file combo. First, create a #temp table to hold results: CREATE TABLE #x(dt datetime, srv nvarchar(520), logical_name sysname, physical_name sysname, FileSizeMb ...

Top 50 recent answers are included