• RedBirdOBX (9/19/2013)


    I would like the ability to run a SP to clear out all the test tables in preparation for the next test.

    I have a frequent need to do such things. The way I do it is quite a bit different though.

    I setup the database the way I want it for the tests. Then, I back it up. The backup is usually quite a bit smaller than the "real" database because I've dropped all tables, etc, that aren't a part of the testing. To prep for the "next" test, I simply drop the database and do a restore. Of course, I have a script to do that, as well.

    Another trick is to setup the database for testing, as before. Then do a restore from that database to a new database for testing. That usually hums right along.

    --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)