How to repair or re-upgrade only TfsBuild database in TFS 2008SP1?  <div>Recently with a <a id=y2bg title="lots of troubles" href="http://geekswithblogs.net/mnf/archive/2008/09/24/my-experience-with-upgrading-tfs-2005-to-tfs-2008.aspx">lots of troubles</a> I upgraded TFS 2005 to TFS 2008. The latest issue that <a id=bwt- title="I hacked was missing columns" href="http://social.msdn.microsoft.com/Forums/en-US/tfssetup/thread/09a9f4e8-6bf2-4a4e-bfcb-f030df8d4736/">I hacked was missing columns</a> in TFSBuild database. </div> <div> </div> <div>We mostly are using Source Control and Work Items functionality of TFs, antd they work fine after conversion for a few weeks.<br></div> <div align=left> </div> <div align=left>But now when we tried to use builds, we've got the errors(see below). </div> <p align=left>Is it possible to repair or re-upgrade  only TfsBuild database in TFS 2008SP1  without affecting source control functionality? </p> <p align=left>All SPs in TfsBuild are encrypted, that make it harder to investigate/workaround. <br><br><span style="font-size:10pt;font-family:Arial"><font color="#ff0000">Description of the error:<br></font>TF53010: The following error has occurred in a Team Foundation component or extension:<br>Date (UTC): 7/10/2008 4:08:35 AM<br>Machine: Application Domain: /LM/W3SVC/904242201/Root/Build-3-128677648568436123<br>Assembly: Microsoft.TeamFoundation.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727<br>Process Details:<br>  Process Name: w3wp<br>  Process Id: 5560<br>  Thread Id: 5716<br>  Account name: </span></p> <p><span style="font-size:10pt;font-family:Arial">Detailed Message: TF53014: A crash report for this problem was recently created; a new crash report for this occurrence of the problem is not being created. This problem has occurred 3 times.<br>Web Request Details<br>    Url: <a title="http://webjet011:8080/Build/v2.0/BuildService.asmx" href="http://webjet011:8080/Build/v2.0/BuildService.asmx"><font color="#0072bc">http://MyServer:8080/Build/v2.0/BuildService.asmx</font></a> [method: POST]<br>    User Agent: Team Foundation (devenv.exe, 9.0.30729.1)<br>    Headers: Content-Length=498&amp;Content-Type=application%2fsoap%2bxml%3b+charset%3dutf-8&amp;Accept-Encoding=gzip&amp;Accept-Language=en-AU&amp;Expect=100-continue&amp;Host=MyServer%3a8080&amp;User-Agent=Team+Foundation+(devenv.exe%2c+9.0.30729.1)&amp;X-TFS-Version=1.0.0.0&amp;X-TFS-Session=df97fa8d-07a5-49a6-8b8c-9d23a875b9b4&amp;TF-Instance=df97fa8d-07a5-49a6-8b8c-9d23a875b9b4<br>    Path: /Build/v2.0/BuildService.asmx<br>    Local Request: True<br>    Host Address: 172.28.6.139<br>    User: Build [authentication type: NTLM]</span></p> <p><span style="font-size:10pt;font-family:Arial"><font color="#ff0000">Exception Message: Invalid column name 'Reason'.<br>.TfsBuild..prc_QueueBuild: Database Update Failure - Error %error=&quot;207&quot;;% executing INSERT statement for @queuedBuilds</font> (type SqlException)<br>SQL Exception Class: 16<br>SQL Exception Number: 207<br>SQL Exception Procedure: prc_iiQueueBuilds<br>SQL Exception Line Number: 239<br>SQL Exception Server: MYSERVER<br>SQL Exception State: 1<br>SQL Error(s):<br>SQL Error[1]: System.Data.SqlClient.SqlError: MYSERVER.TfsBuild..prc_QueueBuild: Database Update Failure - Error %error=&quot;207&quot;;% executing INSERT statement for @queuedBuilds<br>    Class: 16<br>    Number: 900004<br>    Source: .Net SqlClient Data Provider<br>    State: 1<br>    Procedure: prc_QueueBuild<br>    Line Number: 72</span></p> <p><span style="font-size:10pt;font-family:Arial">Exception Data Dictionary:<br>HelpLink.ProdName = Microsoft SQL Server<br>HelpLink.ProdVer = 09.00.3073<br>HelpLink.EvtSrc=MSSQLServer<br>HelpLink.EvtID = 207<br>HelpLink.BaseHelpUrl = <a title="http://go.microsoft.com/fwlink" href="http://go.microsoft.com/fwlink"><font color="#0072bc">http://go.microsoft.com/fwlink</font></a><br>HelpLink.LinkId = 20476</span></p> <p><span style="font-size:10pt;font-family:Arial"><br>Exception Stack Trace:    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)<br>   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)<br>   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)<br>   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)<br>   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()<br>   at System.Data.SqlClient.SqlDataReader.get_MetaData()<br>   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)<br>   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)<br>   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)<br>   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)<br>   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)<br>   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)<br>   at Microsoft.TeamFoundation.Server.SqlResourceComponent.execute(ExecuteType executeType, CommandBehavior behavior)</span></p> <p><span style="font-size:10pt;font-family:Arial"> </span></p><hr size="1" align="left" width="25%">Michael Freidgeim, http://geekswithblogs.net/mnf/© 2009 Microsoft Corporation. All rights reserved.Tue, 31 Mar 2009 10:24:12 Zfa81ffed-4574-410e-be7f-7a86462f15fchttp://social.msdn.microsoft.com/Forums/en-US/tfssetup/thread/fa81ffed-4574-410e-be7f-7a86462f15fc#fa81ffed-4574-410e-be7f-7a86462f15fchttp://social.msdn.microsoft.com/Forums/en-US/tfssetup/thread/fa81ffed-4574-410e-be7f-7a86462f15fc#fa81ffed-4574-410e-be7f-7a86462f15fcMichael Freidgeimhttp://social.msdn.microsoft.com/Profile/en-US/?user=Michael%20FreidgeimHow to repair or re-upgrade only TfsBuild database in TFS 2008SP1?  <div>Recently with a <a id=y2bg title="lots of troubles" href="http://geekswithblogs.net/mnf/archive/2008/09/24/my-experience-with-upgrading-tfs-2005-to-tfs-2008.aspx">lots of troubles</a> I upgraded TFS 2005 to TFS 2008. The latest issue that <a id=bwt- title="I hacked was missing columns" href="http://social.msdn.microsoft.com/Forums/en-US/tfssetup/thread/09a9f4e8-6bf2-4a4e-bfcb-f030df8d4736/">I hacked was missing columns</a> in TFSBuild database. </div> <div> </div> <div>We mostly are using Source Control and Work Items functionality of TFs, antd they work fine after conversion for a few weeks.<br></div> <div align=left> </div> <div align=left>But now when we tried to use builds, we've got the errors(see below). </div> <p align=left>Is it possible to repair or re-upgrade  only TfsBuild database in TFS 2008SP1  without affecting source control functionality? </p> <p align=left>All SPs in TfsBuild are encrypted, that make it harder to investigate/workaround. <br><br><span style="font-size:10pt;font-family:Arial"><font color="#ff0000">Description of the error:<br></font>TF53010: The following error has occurred in a Team Foundation component or extension:<br>Date (UTC): 7/10/2008 4:08:35 AM<br>Machine: Application Domain: /LM/W3SVC/904242201/Root/Build-3-128677648568436123<br>Assembly: Microsoft.TeamFoundation.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727<br>Process Details:<br>  Process Name: w3wp<br>  Process Id: 5560<br>  Thread Id: 5716<br>  Account name: </span></p> <p><span style="font-size:10pt;font-family:Arial">Detailed Message: TF53014: A crash report for this problem was recently created; a new crash report for this occurrence of the problem is not being created. This problem has occurred 3 times.<br>Web Request Details<br>    Url: <a title="http://webjet011:8080/Build/v2.0/BuildService.asmx" href="http://webjet011:8080/Build/v2.0/BuildService.asmx"><font color="#0072bc">http://MyServer:8080/Build/v2.0/BuildService.asmx</font></a> [method: POST]<br>    User Agent: Team Foundation (devenv.exe, 9.0.30729.1)<br>    Headers: Content-Length=498&amp;Content-Type=application%2fsoap%2bxml%3b+charset%3dutf-8&amp;Accept-Encoding=gzip&amp;Accept-Language=en-AU&amp;Expect=100-continue&amp;Host=MyServer%3a8080&amp;User-Agent=Team+Foundation+(devenv.exe%2c+9.0.30729.1)&amp;X-TFS-Version=1.0.0.0&amp;X-TFS-Session=df97fa8d-07a5-49a6-8b8c-9d23a875b9b4&amp;TF-Instance=df97fa8d-07a5-49a6-8b8c-9d23a875b9b4<br>    Path: /Build/v2.0/BuildService.asmx<br>    Local Request: True<br>    Host Address: 172.28.6.139<br>    User: Build [authentication type: NTLM]</span></p> <p><span style="font-size:10pt;font-family:Arial"><font color="#ff0000">Exception Message: Invalid column name 'Reason'.<br>.TfsBuild..prc_QueueBuild: Database Update Failure - Error %error=&quot;207&quot;;% executing INSERT statement for @queuedBuilds</font> (type SqlException)<br>SQL Exception Class: 16<br>SQL Exception Number: 207<br>SQL Exception Procedure: prc_iiQueueBuilds<br>SQL Exception Line Number: 239<br>SQL Exception Server: MYSERVER<br>SQL Exception State: 1<br>SQL Error(s):<br>SQL Error[1]: System.Data.SqlClient.SqlError: MYSERVER.TfsBuild..prc_QueueBuild: Database Update Failure - Error %error=&quot;207&quot;;% executing INSERT statement for @queuedBuilds<br>    Class: 16<br>    Number: 900004<br>    Source: .Net SqlClient Data Provider<br>    State: 1<br>    Procedure: prc_QueueBuild<br>    Line Number: 72</span></p> <p><span style="font-size:10pt;font-family:Arial">Exception Data Dictionary:<br>HelpLink.ProdName = Microsoft SQL Server<br>HelpLink.ProdVer = 09.00.3073<br>HelpLink.EvtSrc=MSSQLServer<br>HelpLink.EvtID = 207<br>HelpLink.BaseHelpUrl = <a title="http://go.microsoft.com/fwlink" href="http://go.microsoft.com/fwlink"><font color="#0072bc">http://go.microsoft.com/fwlink</font></a><br>HelpLink.LinkId = 20476</span></p> <p><span style="font-size:10pt;font-family:Arial"><br>Exception Stack Trace:    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)<br>   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)<br>   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)<br>   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)<br>   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()<br>   at System.Data.SqlClient.SqlDataReader.get_MetaData()<br>   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)<br>   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)<br>   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)<br>   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)<br>   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)<br>   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)<br>   at Microsoft.TeamFoundation.Server.SqlResourceComponent.execute(ExecuteType executeType, CommandBehavior behavior)</span></p> <p><span style="font-size:10pt;font-family:Arial"> </span></p><hr size="1" align="left" width="25%">Michael Freidgeim, http://geekswithblogs.net/mnf/Sat, 11 Oct 2008 00:36:22 Z2008-10-11T00:36:22Zhttp://social.msdn.microsoft.com/Forums/en-US/tfssetup/thread/fa81ffed-4574-410e-be7f-7a86462f15fc#893ba4e7-5fec-4f01-962d-92b6051f1b2bhttp://social.msdn.microsoft.com/Forums/en-US/tfssetup/thread/fa81ffed-4574-410e-be7f-7a86462f15fc#893ba4e7-5fec-4f01-962d-92b6051f1b2bBill.Wanghttp://social.msdn.microsoft.com/Profile/en-US/?user=Bill.WangHow to repair or re-upgrade only TfsBuild database in TFS 2008SP1?<font style="font-size:14px">Hi Michael<br>   </font> <p style="font-size:11pt;margin:0in;font-family:Calibri"><font style="font-size:14px" face=Verdana>There's no way to just repair the TfsBuild database.  We might be able to rely on the reparation of TFS. And repair TFS from the installation media will repair all databases. Back up database is a must before you take further actions. And <a href="http://msdn.microsoft.com/en-us/library/ms253070.aspx">this article</a> describes how to back up TFS. </font></p><hr size="1" align="left" width="25%">Please mark the replies as answers if they help and unmark them if they provide no help.Mon, 13 Oct 2008 12:50:09 Z2008-10-13T12:50:09Zhttp://social.msdn.microsoft.com/Forums/en-US/tfssetup/thread/fa81ffed-4574-410e-be7f-7a86462f15fc#b1fef7b9-162f-48f6-904a-52fc1847e590http://social.msdn.microsoft.com/Forums/en-US/tfssetup/thread/fa81ffed-4574-410e-be7f-7a86462f15fc#b1fef7b9-162f-48f6-904a-52fc1847e590Bill.Wanghttp://social.msdn.microsoft.com/Profile/en-US/?user=Bill.WangHow to repair or re-upgrade only TfsBuild database in TFS 2008SP1?:) You can test the forum in MSDN Sandboxx <a href="http://social.msdn.microsoft.com/Forums/en-US/msdnsandbox/threads">http://social.msdn.microsoft.com/Forums/en-US/msdnsandbox/threads</a>.<hr class="sig">Please mark the replies as answers if they help and unmark them if they provide no help.Tue, 31 Mar 2009 03:08:21 Z2009-03-31T03:08:21Zhttp://social.msdn.microsoft.com/Forums/en-US/tfssetup/thread/fa81ffed-4574-410e-be7f-7a86462f15fc#ff04e9bc-45da-4cb7-b64f-df3ae062ccd5http://social.msdn.microsoft.com/Forums/en-US/tfssetup/thread/fa81ffed-4574-410e-be7f-7a86462f15fc#ff04e9bc-45da-4cb7-b64f-df3ae062ccd5Michael Freidgeimhttp://social.msdn.microsoft.com/Profile/en-US/?user=Michael%20FreidgeimHow to repair or re-upgrade only TfsBuild database in TFS 2008SP1?<span class=postedBy>I followed </span> <span class=postedBy><a href=09a9f4e8-6bf2-4a4e-bfcb-f030df8d4736>Buck Hodges  suggestion </a> to &quot; drop the columns that you hacked in and run repair&quot;. It fixed the problem.<br/> </span><hr class="sig">Michael Freidgeim, http://geekswithblogs.net/mnf/Tue, 31 Mar 2009 10:22:28 Z2009-03-31T10:22:28Z