Handling Fragmentation

  • I've been tasked with developing a package and database elements that will allow us to run Indexing on any version of SQL on any or all server(s) on our network differentiating the need on each index for a rebuild or reorg based on fragmentation and do all this from a single package on a single server running multiple threads and hopefully be able to complete in an overnight run. I'm new to working with fragmented indexes and this type of dev. Can someone direct me in the right direction to find information or give some insight?

  • Don't reinvent the wheel. There are lots of scripts written and tested that do just this. Like the one found here: http://www.sqlfool.com

    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
  • Here is another one you can look at:

    Defragmenting/Rebuilding Indexes in SQL Server 2005 and 2008

    http://weblogs.sqlteam.com/tarad/archive/2009/11/03/DefragmentingRebuilding-Indexes-in-SQL-Server-2005-and-2008Again.aspx

  • ola.hallengren.com

    that one is best IMHO because it offers up much more than just index maintenance stuff.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • Thanks TheSQLGuru, I have one question though. I'm assuming that the script needs to executed on the master database and then the sprocs created are called inside jobs, other sprocs etc?

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

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