Cleaning the VS 2010 Load Test Repository DB

While working on another issue, my customer realized the the VS 2010 load test respository was full and he could no longer run load tests.  There had been some crashes and it appears that there were orphaned entries in the repository.  This can be a huge problem if your repository is using SQL Server Express Edition since there is a limit on the size of a single database.

To clean up the loadTestDB, you need to query the list of load test runs via

Select * from LoadTestRun

on the LoadTestDB.  The you can use the stored procedure Prc_DeleteLoadTestRun and pass it the appropriate LoadtestRunId as a parameter to delete the run data.

While you are in there, you probably will want to set the LoadTestDB recovery model to Simple.  Setting the recovery model to Simple will save space and increase speed.  Steps for how to do this are documented here: https://blogs.msdn.com/b/mahipalkante/archive/2010/06/10/vs-2010-load-test-results-database-recovery-model.aspx