1 Reply Latest reply on Sep 18, 2018 3:58 AM by frak

    SQL Monitor Transaction Log Space %

    2her

      His there a way to monitoring the transaction log space by percentages? I need Solarwinds to alert me when a there is %50 usages.

        • Re: SQL Monitor Transaction Log Space %
          frak

          This is a common task for DBAs, so there are many queries already written to do the task.  Just setup a SQL monitor with this (or another version of it) code assuming the SQL server version is reasonably modern.

           

          This returns the percentage full for the log files for each database on the server.  You may or may not want to summarise this for the actual monitor, since only one number and text can be returned.  You could do a 'top' full databases for example.

           

          SELECT instance_name as [DBName], cntr_value as "LogFullPercentage" 
          FROM sys.dm_os_performance_counters 
          WHERE counter_name LIKE 'Percent Log Used%' AND instance_name not in ('_Total', 'mssqlsystemresource')