SQL Clone
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)

Alter Index with online rebuild - SQL 2005

By Alen Teplitsky,

This is an Alter Index script i made up from the one found in BOL and some other scripts we had. You need to create a table to hold the fragmentation data and it has a date column so you can track historical data. You can also add a db_mail part at the end to send you results.

This is version 1 and it scans all the tables. My next version is to have it scan only indexes in selected tables.

Total article views: 2109 | Views in the last 30 days: 3