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