Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reorganize / rebuild indexes
Message
From
02/06/2009 09:28:30
 
General information
Forum:
Microsoft SQL Server
Category:
Database management
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01403038
Message ID:
01403155
Views:
49
Thank you Sergey! this is what I was looking for. Your help is always very much appriciated.

Rollin

>See SQL Server 2005 and 2008 - Backup, Integrity Check and Index Optimization . I'm using 'Integrity Check and Index Optimization' part of it. Didn't have time to see if I want to use 'Backup' part as well.
>
>>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.
Thank You

Rollin Burr

Politicians and diapers have one thing in common. They should both be changed regularly, and for the same reason.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform