Tuesday, June 30, 2015

Rebuild all Indexes on a Microsoft SQL Server

As part of database maintenance, a DBA may wish to do periodical rebuild of all indexes. The below may come handy.
EXEC sp_MSForEachTable 'ALTER INDEX ALL ON ? REBUILD'

No comments:

Post a Comment

Do provide your constructive comment. I appreciate that.