Knowledge: SQL Reindex all tables in database
Back
Knowledge
Title*SQL Reindex all tables in database
ManualTroubleshooting
Manual Level TwoServer
Created12/08/2020
DetailMost of the time reindexing of SQL is not required and often DBA's will run scripts anyway. The below can be run to rebuild all indexes for a database.
Exec sp_msforeachtable 'SET QUOTED_IDENTIFIER ON; ALTER INDEX ALL ON ? REBUILD'
GO
Additional Manual Locations