Rebuild/Reoganize all indexes of all databases

  • Comments posted to this topic are about the item Rebuild/Reoganize all indexes of all databases

  • [font="Verdana"]its English version please? ..... just joking !! 😀

    Nice Work[/font]

  • Had to change to run in SQL Server 2005. Just changed the initialization of @Loop ,@Qt and Total.

    Nice script. Just want to know Which Language?

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • I have written this logic using sp_msforeachdb.

    I need to ask Why have you used this condition

    p.page_count >= 10

    Is this to check if the Index is large enough to Rebuild or reorganize or any other reason?

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • Nice article.

    I have taken exactly the opposite approch 🙂

    I start out with finding all the indexes which are fragmented (30+) and then rebuild dynamic sql to actually rebuild or reorganize. These results into two sweet and short SPs + I log everyday what I find about this indexes.

  • After applying the alter index, out of 10 there are 8 alter statements are same - actually i ran this script twice to check there is no anything missed - so i want to know either alter with rebuild or reorganize both ran multiple times and your script suggest me to those alter statements agian and atain - I want to learn why those are not updated? where is the problem? are the indexes not properly implemented? Please help

    Shamshad Ali

  • Hey guys, the language used is Portuguese (Brazilian Portuguese).

  • HI SQL Kiwi

    Just want to know if the script through link runs for Index Defrag so we have to run Update statistics separately or whole script takes care of Update Statistics also?

    THanks

  • Hi

    Can you please share the script???

    Thanks.

  • Thanks for the script.

Viewing 11 posts - 1 through 10 (of 10 total)

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