Automate Reindexing

  • Is there any scripts out there where i can check a db and find which indexes are to be rebuilt and after cehcking it has to select those indexes and rebuild them.

  • Check the scripts library here, there are lots and lots of variations floating around

    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
  • I looked out but didnt find any which suits my criteria.

    just as we get gragmentation report from SSMS when right click on DB, I need something like that which reports indexes to be rebuild and select only those indexes and rebuild them.

    I just want to setup this as a job and run it when ever i need.

  • These two should give you a good place to start. You may have to tweak an existing script if you can't find one that does exactly what you want.

    http://qa.sqlservercentral.com/scripts/Index+Management/63649/

    http://qa.sqlservercentral.com/scripts/SQL+Server+2005/61278/

    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
  • Hi there! Here's a link to my blog post with the script I use: Index Defrag Script. This is executed nightly on some fairly large databases with great success. Let me know if you have any questions. 🙂

    HTH!

    Regards,

    Michelle Ufford
    SQLFool.com - Adventures in SQL Tuning

Viewing 5 posts - 1 through 4 (of 4 total)

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