2014-01-08

TSQL - How to suspend indices/indexes (disable and rebuild)

Disable:
ALTER INDEX [INDEX_NAME] ON [SCHEMA_NAME].[TABLE_NAME] DISABLE;

Enable (recreate):
ALTER INDEX [INDEX_NAME] ON [SCHEMA_NAME].[TABLE_NAME] REBUILD;


Alternate source:
http://blog.sqlauthority.com/2007/05/17/sql-server-disable-index-enable-index-alter-index/

No comments:

Post a Comment