Automate Out of Date SQL Server Statistics with PowerShell

We use some maintenance tools which tell us when tables need their statistics updated and we wanted to know if we could build some tools to automate updating statistics on tables outside of maintenance schedules, on the basis of when we receive the alerts from these tools. For an example, we might receive a text or email alert telling us that table dbo.Example has statistics that are out-of-date or that the data has heavily fluctuated, and we'd like to automate updating statistics on this object automatically. Our environment allows us to perform updates when they are needed for most of our servers where we monitor the statistics fluctuation.

Read More