If I don't already have any logging in place, is there any way to use the DMVs or anything else on SQL Server to determine which query / event caused my database's last grow operation?


1 Answer 1


You could use the undocumented function sys.fn_dblog filtering by the collumn transaction name like this:

SELECT [Transaction Name] 
FROM sys.fn_dblog(NULL,NULL) 
WHERE [Transaction Name] IS NOT NULL;

On the query result you should look for SetFileSize

Query result

The line before the SetFileSize will show the last event that occured to cause the growth.

Not the answer you're looking for? Browse other questions tagged or ask your own question.