Current Database Update All Table Statistics with Fullscan

Validated against: SQL Server 2005.

Updating statistics against each table in the current database by using the undocumented stored procedure [sp_MSforeachtable].

exec sp_MSforeachtable 'UPDATE STATISTICS ? WITH FULLSCAN'
This entry was posted in SQL 2005, SQL 2008, SQL 2008 R2 and tagged . Bookmark the permalink.