Script to check status of Index rebuild

  • I'm in the process of rebuilding all of the indexes in my database, is there a script out there that can tell me the status, # of tables completed, # of tables left that need to be rebuilt?

    Thanks

  • If you want to know which tables your custom script has rebuild, add something in to the custom script to log that. If you want to see the fragmentation level of all the indexes in the database, query the sys.dm_db_index_physical_stats DMV. That will give you the current fragmentation though it won't say when the index was last rebuilt.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply