Index fragmentation on all databases

  • Comments posted to this topic are about the item Index fragmentation on all databases

  • You know, I kind of prefer the kinds of questions where there is a way to answer the question 😀


    Just because you're right doesn't mean everybody else is wrong.

  • Rune Bivrin wrote:

    You know, I kind of prefer the kinds of questions where there is a way to answer the question 😀

    This wasn't someone posting a question.  This site allows folks to share scripts and that's what this post was.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • Ooops!

     

    This isn't the first time I've accidentally clicked on the "Featured Script" link instead of the "Question of the Day" link. And to add to my confusion, I misread  "Can be run on multiple instances in the same time using central management capability." as "Can this be run on multiple instances in the same time using central management capability?".

     

    So apologies to the OP, although to be honest, I put it down to a misstep in the QOTD management, rather than an error on OP:s part.


    Just because you're right doesn't mean everybody else is wrong.

  • Heh... I make mistakes of that nature prior to having at least 2 full 12 oz mugs of coffee.  That means it's been happening a whole lot to me lately so I have a real live appreciation for what you've just explained. 😀

     

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • Just a heads up, master.sys.sp_msforeachdb is still undocumented and unsupported by Microsoft, and it can - with many databases - simply skip some without any warning or errors, using a simple cursor would guarantee correct result and would in this case be preferable.

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

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