Our SharePoint databases are set to the (nonsensical) 1MB default autogrow out-of-the-box, and I need to "convince" our application owner that this is wrong. Is there a means to monitor the autogrow activity of SQL Server?
I would like to be able to report how frequently this activity is occuring with the 1MB setting.
Log file autogrowths are reported in the SQL logs or the Application event log. You can also use things like SQL Trace or SQL Profiler to monitor SQL events. Here's a MSDN article that discusses monitoring SQL events.
EDIT: In the Application event log look for Event ID 5144 for autogrowth cancel events and 5145 for successful/completed autogrowth events.
EDIT2: To look for db log file auogrowth events in your SQL log you can use this:
Increment the 0 in order to have xp_readerrorlog use archived error log files. 0 to (n-1) where n is the number of error log files you have.
You can also set up event notifications for an autogrow event. Something like this:
or for the log file:
Where NotifyAutogrow is the name of a Service Broker instance. More info here. You would need to set this service up for your environment.
As further ammunition for you, checkout this blog post I did which discusses data file auto-growth: Importance of data file size management.
It depends on what you're talking about.
In my experience, SQL Server did not log autogrow to
ERRORLOG
as has been suggested, instead it's logged in the default trace, and the default trace can be disabled and enabled.To check if it's enabled, see:
In case it's disabled, you can enable it:
Don't forget to run
RECONFIGURE
afterwards.To check for
autogrow
events you can use:Where the parameter to
fn_trace_gettable
is the name of the current (or archived) trace.You can find the path for the current trace as follows:
Log file autogrowths are reported in the SQL logs or the Application event log. You can also use things like SQL Trace or SQL Profiler to monitor SQL events.