2019-05-03 (first published: 2015-05-15)
1,583 reads
declare @SQLPerfLogSpace table ( DBNAME sysname, LogSizeMB decimal(10,4), LogSpaceUsed decimal(10,4), Status Bit --Status of the log file. Always 0. ) insert into @SQLPerfLogSpace exec('DBCC SQLPERF(logspace)') select * from @SQLPerfLogSpace Order by LogSizeMB desc select * from @SQLPerfLogSpace Order by LogSpaceUSed desc