Ástþór IP

Published

June 5, 2012

Ástþór IP in Microsoft SQL Server | June 5, 2012

How to reindex and update statistics on all tables in a MSSQL database

Here’s how to rebuild indexes:

USE DatabaseName
GO
EXEC sp_MSforeachtable @command1="print '?' DBCC DBREINDEX ('?', ' ', 80)"
GO
EXEC sp_updatestats
GO
Ástþór IP

Published

June 5, 2012

Independent Publisher empowered by WordPress