Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Dynamic DBCC DBREINDEX

By AJ Ahrens,

This script uses sysobjects and sysindexes to ID all tables in a database that are indexed, and/or clustered.  It then runs through per table all of the indexes and runs DBREINDEX with their fillfactor.  This eliminates having to maintain a list of all indexes and having code fail when it tries to modify indexes that no longer exist.  It also ensures that ALL indexes are processed for the database.

Total article views: 1645 | Views in the last 30 days: 5
 
Related Articles
FORUM

index

index

FORUM

Index

Index

FORUM

Index

index

FORUM

Indexes

Clustered Index and Nonclustered Index

 
Contribute