Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reorganize / rebuild indexes
Message
 
 
To
01/06/2009 14:48:03
General information
Forum:
Microsoft SQL Server
Category:
Database management
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01403038
Message ID:
01403040
Views:
38
This message has been marked as a message which has helped to the initial question of the thread.
>In SQL 2000 (and still in SQL 2005 - but not being continued) DBCC SHOWCONTIG has been used to capture index statistics. With a cursor, all indexes of all tables (of all DBs) could have their stats extracted with one procedure.
>
>In SQL 2005, sys.dm_db_index_physical_stats is the recommended method. This gives the information differently. Wtih all arguments set to NULL, all of the index information can be selected without the need for a cursor. It gives database_id and object_id, though, not the names.
>
>My question is this: What would be the best way to have a procedure that uses
>
> ALTER INDEX ALL ON ... REORGANIZE and
> sys.dm_db_index_physical_stats
>
>to update all indexes (on all tables, and all DBs) that are more than 20% fragmented??
>
>Your help is greatly appreciated.

Not sure if this is helpful

http://204.9.76.233/Community/forums/t/2163.aspx
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform