gotchasqlMinor
What is the difference between ALTER INDEX and DBCC DBREINDEX?
Viewed 0 times
thewhatdbccdifferencebetweenandindexalterdbreindex
Problem
Is the only difference between
and
just that the DBCC command will reindex all of the indexes on all of the tables in the database?
ALTER INDEX [index_name] on [object_name] REBUILD with (ONLINE=OFF, FILLFACTOR=90)and
DBCC DBREINDEX([dbname], 90)just that the DBCC command will reindex all of the indexes on all of the tables in the database?
Solution
The DBCC command is a consistency checker utility inside of SQL Server whereas ALTER is a DDL SQL command. The DBCC REINDEX command was deprecated in a previous version so it is not as robust as the new ALTER INDEX command is today. There is more functionality in the ALTER INDEX than the DBCC REINDEX commands:
http://msdn.microsoft.com/en-us/library/ms188388.aspx
Happy indexing!
http://msdn.microsoft.com/en-us/library/ms188388.aspx
Happy indexing!
Context
StackExchange Database Administrators Q#11416, answer score: 9
Revisions (0)
No revisions yet.