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
Change is inevitable... Change for the better is not.