Ever wanted to know the list of databases where Transaction Log file grew? The following T-SQL script will give the list of the databases and how many times the log file grew by using the auto-grow value. This information is available since the last restart of the SQL Instance and will be reset again when the Instance is restarted.
SELECT INSTANCE_NAME,cntr_value FROM MASTER.dbo.sysperfinfo WHERE COUNTER_NAME = 'Log Growths' AND INSTANCE_NAME NOT IN ('_Total','mssqlsystemresource') AND CNTR_VALUE <> 0
Note: This list will not count if you grow the log file manually.
Do you like this site? Like our FB page @ Facebook.com\LearnSQLWithBru so that, you know when there is a new blog post.
— Bru Medishetty