• zi (12/30/2012)


    Do you have a script to know the fragmentation size for the whole database not only table by table.

    That's a completely nonsensical request as the concept of 'fragmentation size for the whole database' is meaningless. As I mentioned earlier, databases don't have fragmentation. Indexes do.

    Then you look at the fragmentation of the indexes and decide which to rebuild. I recommend you use something like Ola's scripts

    http://ola.hallengren.com/Versions.html

    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