Rebuild Index Task
Applies To: SQL Server 2016
The Rebuild Index task rebuilds indexes in SQL Server database tables and views. For more information about managing indexes, see Reorganize and Rebuild Indexes.
By using the Rebuild Index task, a package can rebuild indexes in a single database or multiple databases. If the task rebuilds only the indexes in a single database, you can choose the views and tables whose indexes the task rebuilds.
This task encapsulates an ALTER INDEX REBUILD statement with the following index rebuild options:
Specify a FILLFACTOR percentage or use the original FILLFACTOR amount.
Set SORT_IN_TEMPDB = ON to store the intermediate sort result used to rebuild the index in tempdb. When the intermediate sort result is set to OFF, the result is stored in the same database as the index.
Set PAD_INDEX = ON to allocate the free space specified by FILLFACTOR to the intermediate-level pages of the index.
Set IGNORE_DUP_KEY = ON to allow a multirow insert operation that includes records that violate unique constraints to insert the records that do not violate the unique constraints.
Set ONLINE = ON to not hold table locks so that queries or updates to the underlying table can proceed during re-indexing.
Online index operations are not available in every edition of MicrosoftSQL Server. For a list of features that are supported by the editions of SQL Server, see Features Supported by the Editions of SQL Server 2016.
Specify a value for MAXDOP to limit the number of processors used in a parallel plan execution.
Specify WAIT_AT_LOW_PRIORITY, MAX_DURATION, and ABORT_AFTER_WAIT to control how long the index operation waits for low priority locks.
For more information about the ALTER INDEX statement and index rebuild options, see ALTER INDEX (Transact-SQL).
You can set properties through SSIS Designer. This task is in the Maintenance Plan Tasks section of the Toolbox in SSIS Designer.
For more information about the properties that you can set in SSIS Designer, click the following topic:
For more about how to set these properties in SSIS Designer, see Set the Properties of a Task or Container.