VSTS Test Repository DB Exceeds allowed size
April 16th, 2009 by Rakesh KamathI was trying to run a load test using Visual Studio Team Test Edition yesterday for a large data set and came across an error that said:
Error occurred running test. (Computer LOADTESTMACHINE) Could not access the load test results repository: The load test results repository is out of space. Allocate more space to the repository (if possible), or delete results of older load test runs.
Visual Studio dumps test results in a local instance of MS SQL Server Express and it was easy enough to guess that this was due to SQL Server Express exceeding the db size cap of 4GB (non-Express editions don’t have this cap). I have been running largish load tests on this machine for 8-9 months now and it made sense that I would run out of space.
I went looking for a solution and saw that Microsoft devs have suggested in forums and in blog posts that the DB be cleaned up via SQL to delete test results older than a time period of your choice.
Two things surprised me:
- There is no UI option to manage this in Visual Studio. Before I ran the sql commands, I tried deleting old test results via the “Test Results” window in VS. This apparently deletes exported test results - I am not sure what else it does but it didn’t seem to clean up the DB for the test results. So this means that if you want to clean up your DB when you run into these kind of issues, you need to talk dirty to SQL Server directly. Feels unclean. I Would like to know if I am missing something because this seems like something that shouldn’t require testers even going near a SQL Script.
- I tried and could not find any formal guidance or documentation on msdn to address this issue, even in Practices & Patterns. I may have missed it totally so I hope somebody corrects me if this is actually there. This would be a pretty common scenario I would think so it deserves better than users needing to search blogs and the forums for an answer.
The script I ran is included with this post. A few things to keep in mind:
- This script cleans up only Load Test Results
- If you are using a typical installation of Visual Studio Team Test Edition, you need to run this against the db named “LoadTest” on the locally installed instance of MS SQL Server Express installed during Visual Studio installation.
- Change the value of the @DaysToKeep variable to a suitable value in days. I have set it to 30 days in the script so that results older than 30 days are deleted.
--@DaysToKeep - indicates the number of previous days records to keep. For example "30" indicates that I want to delete test results older than 30 days
DECLARE @DaysToKeep int
Set @DaysToKeep = 30 - This script may take a very long time to run - think in terms of hours rather than minutes. It took about 2-2.5 hours in my case. So, don’t abort the execution because you think the script is stuck.
The script (rename to .sql):
deleteoldloadtestresults.txt

September 1st, 2010 at 2:56 am
not sure but I think you can :
1- open a load test
2- right click on the root node
3- select Open and manage test results
4- select a campaign then results
5- click remove.
slower than the sql script but allow to remove exactly what is unnecessary
May 11th, 2011 at 9:07 pm
That site has got lots of quite useful stuff on it! Cheers for supporting me!
August 19th, 2011 at 4:06 pm
Hey, that’s exactly the same issue I have right now, Im pretty new on this, so what exactly did you do? since there is no UI for the SQL what should I download? Im using VSTS2010, should I download the sql manager for SQL 2008?, I thought I did that but when I installed it there was some other sutff installed but not the SQL interface :S
February 1st, 2012 at 3:00 am
Hi this is kinda of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML. I’m starting a blog soon but have no coding knowledge so I wanted to get advice from someone with experience. Any help would be greatly appreciated!
February 1st, 2012 at 4:03 am
Very great post. I simply stumbled upon your weblog and wished to say that I have really loved browsing your blog posts. In any case I will be subscribing for your rss feed and I’m hoping you write again very soon!
February 1st, 2012 at 1:55 pm
Audio started playing anytime I opened up this webpage, so irritating!
February 1st, 2012 at 2:35 pm
Appreciating the time and effort you put into your site and detailed information you present. It’s great to come across a blog every once in a while that isn’t the same out of date rehashed information. Great read! I’ve saved your site and I’m including your RSS feeds to my Google account.
February 3rd, 2012 at 7:38 pm
Howdy this is kinda of off topic but I was wanting to know if blogs use WYSIWYG editors or if you have to manually code with HTML. I’m starting a blog soon but have no coding expertise so I wanted to get advice from someone with experience. Any help would be enormously appreciated!
February 3rd, 2012 at 7:50 pm
In the awesome pattern of things you actually get an A with regard to effort. Where you actually misplaced everybody was on your facts. As they say, details make or break the argument.. And it couldn’t be more true right here. Having said that, allow me inform you exactly what did do the job. The writing is rather persuasive and this is possibly the reason why I am taking an effort to comment. I do not make it a regular habit of doing that. Secondly, while I can see a jumps in reason you come up with, I am not really sure of just how you appear to connect your details which in turn help to make the actual conclusion. For right now I shall subscribe to your position however trust in the future you actually link the dots better.
February 3rd, 2012 at 10:29 pm
The very root of your writing whilst appearing agreeable in the beginning, did not really sit properly with me after some time. Someplace within the paragraphs you actually were able to make me a believer unfortunately only for a short while. I nevertheless have a problem with your leaps in assumptions and one might do well to help fill in those breaks. If you can accomplish that, I will definitely be amazed.