Alter Index All Tables

Posted by Derek Dieter on SQL Server Planet See other posts from SQL Server Planet or by Derek Dieter
Published on Sun, 13 Jun 2010 21:17:46 +0000 Indexed on 2010/06/13 21:24 UTC
Read the original article Hit count: 228

Filed under:
This script comes in handy when needing to alter all indexes in a database and rebuild them. This will only work on SQL Server 2005+. It utilizes the ALL keyword in the Alter index statement to rebuild all the indexes for a particular table. This script retrieves all base tables and stores [...]

© SQL Server Planet or respective owner

Related posts about DBA