Saturday, February 25, 2012

DBCC DBREINDEX

Hello,
What is DBCC DBREINDEX? Does anybody use this anymore?
Thanks.Straight from BOL....
It rebuilds indexes for a given table...I wouldn't use it as there are
alternatives in SQL 20005 (Alter index) and the command is going to be
removed in future versions of SQL.
Geoff Chovaz
MCTS: SQL Server 2005
MCITP: Database Administrator
MCITP: Database Developer
<Wing9897@.hotmail.com> wrote in message
news:1190221170.406867.297720@.r29g2000hsg.googlegroups.com...
> Hello,
> What is DBCC DBREINDEX? Does anybody use this anymore?
> Thanks.
>|||Wing9897@.hotmail.com wrote:
> Hello,
> What is DBCC DBREINDEX? Does anybody use this anymore?
If you're on SQL Server 2000 - you don't have much choice :)
SQL Server 2005 introduced new syntax based on ALTER INDEX statement
(which is preferred). DBCC DBREINDEX will be removed in future versions.
Some time ago I wrote a script to rebuild all indexes in a given
database, take a look if you'd need such stuff:
http://strefa.guzowski.info/files/proc_reindex.sql
Best regards,
Marcin Guzowski
http://guzowski.info

No comments:

Post a Comment