tfsteam-project-collection

Tfs 2010 Attach collection error KB2278944CollectionInstall.sql Invalid column name 'System.AreaID'


we had a Tfs 2010 SP1 Team Project Collection, we were trying to detach it and take a back up of the db and reattach it. Detach went fine. while attaching we got this error .

[Error] KB2278944CollectionInstall.sql Line 1587 Error: Invalid column name 'System.AreaID'. Invalid column name 'System.IterationID'. Invalid column name 'ID'. Invalid column name 'ID'. Invalid column name 'ID'. Stamping DB...

On deep Dive analysis into the Logs, we saw this error at the end of the TFS Log

[Error] KB2278944CollectionInstall.sql Line 1587 Error: Invalid column name 'System.AreaID'.
Invalid column name 'System.IterationID'.
Invalid column name 'ID'.
Invalid column name 'ID'.
Invalid column name 'ID'.
Stamping DB...
[Info   @11:50:21.425] [2015-12-08 09:43:55Z][Informational] Microsoft.TeamFoundation.Framework.Server.CollectionServicingException: KB2278944CollectionInstall.sql Line 1587 Error: Invalid column name 'System.AreaID'.
Invalid column name 'System.IterationID'.
Invalid column name 'ID'.
Invalid column name 'ID'.
Invalid column name 'ID'.
Stamping DB... ---> System.Data.SqlClient.SqlException: Invalid column name 'System.AreaID'.
Invalid column name 'System.IterationID'.
Invalid column name 'ID'.
Invalid column name 'ID'.
Invalid column name 'ID'.
Stamping DB...
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.MapException(SqlException ex, QueryExecutionState queryState)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.HandleException(SqlException ex)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.Execute(ExecuteType executeType, CommandBehavior behavior)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteNonQuery(Boolean bindReturnValue)
   at Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(String sqlScriptResourceName, String[] lines, SqlParameter[] sqlParameters)
   --- End of inner exception stack trace ---
   at Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(String sqlScriptResourceName, String[] lines, SqlParameter[] sqlParameters)
   at Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteSql(Stream sqlScriptResource, String sqlScriptResourceName, SqlParameter[] sqlParameters, Boolean retryIfLostConnection)
   at Microsoft.TeamFoundation.Server.Servicing.TFCollection.FrameworkStepPerformer.ExecuteSql(String stepData, ServicingContext servicingContext, Boolean validateOnly)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationStepPerformerBase.Microsoft.TeamFoundation.Framework.Server.IStepPerformer.PerformStep(String servicingOperation, String stepType, String stepData, ServicingContext servicingContext)
   at Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformServicingStep(ServicingStep step, ServicingContext servicingContext, ServicingStepGroup group, ServicingOperation servicingOperation, Boolean validateOnly)
[Info   @11:50:21.425] [2015-12-08 09:43:55Z] Servicing step Tfs2010RtmKB2278944Install SQL servicing step failed. (ServicingOperation: Tfs2010SP1Install; Step group: Tfs2010RtmKB2278944Install)
[Info   @11:50:21.425] [2015-12-08 09:43:55Z][Informational] Clearing dictionary, removing all items.
[Error  @11:50:21.425] The servicing operation failed.

I tried to Stop and Start , Detach and Attach multiple times. Restarted machine too, nothing works


Solution

  • The final solution which works is

    Get into the TFS App Tier server, open command prompt Navigate to the Tools folder.

    `E:\Program Files\Microsoft Team Foundation Server 2010\Tools>'
    

    run the following command and you will get output as below

    TfsConfig repair

    Logging sent to file C:\ProgramData\Microsoft\Team Foundation\Server Configuration\Logs\CFG_SVC_UNK_ 1208_103237.log Command: repair TfsConfig - Team Foundation Server Configuration Tool Copyright (c) Microsoft Corporation. All rights reserved. Acquiring the servicing lock. Servicing lock acquired. Stopping application... Application stopped successfully. Starting application... Application started successfully.

    Now get into the Team admin console, Check the Tab named Status Tfs Attach Error servicing error

    there will be another item above it saying

    Servicing collection Queued.

    After couple of minutes, It should say

    Servicing collection Succeeded

    then you can Bring the collection online. :)