<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">nipun-jain</title><subtitle type="html" /><id>http://blogs.msdn.com/b/nipun-jain/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/nipun-jain/" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/b/nipun-jain/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2012-10-27T13:38:13Z</updated><entry><title>Cleanup redundant test impact data</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/nipun-jain/archive/2012/10/27/cleanup-redundant-test-impact-data.aspx" /><id>http://blogs.msdn.com/b/nipun-jain/archive/2012/10/27/cleanup-redundant-test-impact-data.aspx</id><published>2012-10-27T08:08:13Z</published><updated>2012-10-27T08:08:13Z</updated><content type="html">&lt;p&gt;In this article, I am going to talk about how to get rid of redundant test impact data from Team Foundation Server. The test impact data is mostly&amp;nbsp;stored in tbl_testcodesignature table in project collection database. This table essentially keeps the mapping between a testresult and the impacted CodeSignatures from the product dll. Normally a testcase will use lot of codesingnatures from product so the size of this&amp;nbsp;table grows up in million of rows. Test impact data is associated with a test run which in turn is associated with a particular build. So when a build gets deleted, all the runs associated with a build also gets deleted. As part of run deletion , we delete test impact data from tbl_testCodeSignature table also. So one approach to keep check on size of test impact data table is to delete redundant builds which have lot of test impact data.&lt;/p&gt;
&lt;p&gt;You can find the pattern of data associated with tbl_testcodesignature table with builds by running &amp;nbsp;the following query. This sql query gives an idea of how much rows of&amp;nbsp; tbl_testCodeSignature table belongs to a particular build. This query is for dev10 TFS and should be run at project collection database.&lt;/p&gt;
&lt;p&gt;select tbc.BuildUri, COUNT(*)&lt;/p&gt;
&lt;p&gt;from tbl_TestCodeSignature tc&lt;/p&gt;
&lt;p&gt;join tbl_TestRun tr&lt;/p&gt;
&lt;p&gt;on tc.TestRunId = tr.TestRunId&lt;/p&gt;
&lt;p&gt;join tbl_buildconfiguration tbc&lt;/p&gt;
&lt;p&gt;on tbc.BuildConfigurationId&lt;br /&gt;= tr.BuildConfigurationId&lt;/p&gt;
&lt;p&gt;group by tbc.BuildUri&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If there are unused builds with large amount of test impact data, you can delete those builds using TfsBuild.exe commandline. Make sure you specify testresults as part of build deletion option or you can specify ALL.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10363295" width="1" height="1"&gt;</content><author><name>nipun jain [MSFT]</name><uri>http://blogs.msdn.com/nipunja_4000_live.com/ProfileUrlRedirect.ashx</uri></author></entry></feed>