Time and Space: How to Monitor Drive Space in SQL Server

  • cteDailyGrowth AS (

    --using the row number, join the drive free table to itself, offset by one day. this gets the free

    -- space for each drive on that day and also on the next day.

    SELECT di1.RowNum, di1.EntryDate, di1.DataFree CurrentData, di1.LogFree CurrentLog, di1.BackupFree CurrentBackup,

    di2.DataFree NextData, di2.LogFree NextLog, di2.BackupFree NextBackup

    FROM cteDriveInfo di1

    INNER JOIN cteDriveInfo di2 ON di2.RowNum = di1.RowNum + 1

Viewing post 46 (of 45 total)

You must be logged in to reply to this topic. Login to reply