0

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?

J.D.
  • 37,483
  • 8
  • 54
  • 121

1 Answers1

0

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.

Ronaldo
  • 5,079
  • 1
  • 12
  • 40