• jasona.work (7/5/2013)


    opc.three (7/5/2013)


    jasona.work (7/5/2013)


    might work.

    It might. Or it might randomly skip databases. sp_MsForEachDb is fatally flawed and although Microsoft seems happy enough to employ it within their own Maintenance Plan code, it should not really be trusted. Check out the article I linked to earlier.

    True. I had come across that article back when I was starting to dig into MSFForEachDB, and I do like the features he added into his version of the SP.

    I guess, the second most common answer to a DBA question applies:

    test, test, test in QA, then test again.

    😉

    The need to test is a given. However, knowing the procedure is flawed why use it? Or worse, recommend it? If you read into the blog post you'll learn that the skipping of databases is happenstance and so cannot be predictable even in a QA environment, i.e. the procedure is fatally flawed and is not really fit for production use unless accuracy is unimportant.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato