How to Rebuild Index Since DBREINDEX will be discontinued after SQL 2005
Microsoft Says:
SQL SERVER 2005 supports DBREINDEX but it will be deprecated in future versions.
So the options left out is to use DBCC INDEXDEFRAG which is applicable for online Re-indexing but the best solution is to use ALTER INDEX…
Simple Syntax:
ALTER INDEX PK_Employee_EmployeeID ON HumanResources.Employee
REBUILD;
Click below to access some of related articles:
http://www.sqlservercentral.com/scripts/62410/
http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/