but from sql server2005 we have got this very good facility to make insert/update available (working) while rebuild index is under progress.
to do so the syntax is :
CREATE CLUSTERED INDEX cl_SalesHistory_SaleID ON SalesHistory(SaleID ASC, SaleDate ASC)
WITH(DROP_EXISTING = ON, ONLINE = ON)
in above query we have made our table available/allowing for insert/update while we perform rebuild index operation on it.
ONLINE = { ON | OFF }
Specifies whether underlying tables and associated indexes are available for queries and data modification during the index operation. The default is OFF.
No comments:
Post a Comment