• Perry Whittle (4/9/2012)


    opc.three (4/9/2012)


    however what if you had multiple files to move and missed one?

    The database would not come online!

    The only time this would differ in any way is with file group restores but that's a whole different scenario and not even relevant to this post\script.

    Sure it would. If I have two data files in my database, both on D:\, and I want to move one to E:\ and one to F:\, if I run an alter to move one to E:\ but I forget to move the other one to F:\ the database will happily come online with one data file on D:\ and one on E:\.

    A verification step would help me see if the desired outcome were achieved...sometimes I find it useful to write the verification checks at a completely separate time from when I write the code to make such changes...sometimes even before writing the code to make the changes 😉

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