We have recently moved our Team System installation from a VM onto a physical server. Most aspects seem to work okay (work items, source control etc), but am seeing the following error in the event logs every hour (presumably when the warehouse is updating)

Event Type: Error
Event Source: TFS Warehouse
Event Category: None
Event ID: 3000
Date: 03/06/2009
Time: 12:26:32
User: N/A
Computer: TFS1
TF53010: The following error has occurred in a Team Foundation component or extension:
Date (UTC): 03/06/2009 11:26:32
Machine: TFS1
Application Domain: /LM/W3SVC/1724018147/Root/Warehouse-3-128884367959382827
Assembly: Microsoft.TeamFoundation.Warehouse, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727
Process Details:
Process Name: w3wp
Process Id: 5080
Thread Id: 6016
Account name: NTSERVERS\sqlservice

Detailed Message: TF51209: A run-time error System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.TeamFoundation.WorkItemTracking.Adapter.Adapter.FindTreeNodeUriFromId(Object id, Int32 treeStructureType)
at Microsoft.TeamFoundation.WorkItemTracking.Adapter.Adapter.ProcessKeywordValue(FactEntry fact, PayloadRow fieldRow, PayloadRow dr) at Microsoft.TeamFoundation.WorkItemTracking.Adapter.Adapter.AddWorkItemFactEntry(PayloadRow dr, String projectUri, String previousState, DateTime dtChangedDate)
at Microsoft.TeamFoundation.WorkItemTracking.Adapter.Adapter.PopulateFacts(PayloadRow dr)
at Microsoft.TeamFoundation.WorkItemTracking.Adapter.Adapter.MakeDataChanges()
at Microsoft.TeamFoundation.Warehouse.AdapterWrapper.RunTimerAdapter() occurred on adapter Microsoft.TeamFoundation.WorkItemTracking.Adapter.Adapter.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

We reapplied TFS 2008 SP1 overnight to correct a different issue (iterations added not appearing in the work item iteration list). We noticed that a couple of iterations on two different projects had disappeared, although we were able to track the work items down (their iteration entries were blank). I think we may have an issue with the warehouse iterations being corrupt in some way?

Help appreciated...

edit 09/06/2009 : some more information in case it helps. Our systems team lost three weeks worth of TFS data when doing some maintenance work on the TFS server. The database backups they took before doing the work were "lost" and we had to revert to some that were 3 weeks old. This appears to be where the error has stemmed from as after the warehouse rebuild I can see metrics to just before this incident and none after. And yes, our TFS server now has Gold status, and all the necessary backups are in place :)


Have you tried using the SetupWarehouse command to rebuild the warehouse databases (both relational and OLAP):


  • Hi Ian, thanks for the suggestion. We tried the warehouse rebuild (following the process here - blogs.msdn.com/dstfs/archive/2009/03/06/the-big-one.aspx. Unfortunately it didn't work and we are still seeing the error, despite completely removing the warehouse and installing/building it again from scratch... – Col Jun 9 '09 at 8:47
  • Hmm, sounds like you probably have some missing/corrupt data in the OLTP databases then. Perhaps those "blank" iterations you mentioned. You could perhaps try exporting all the work items to Excel, correcting any missing work-items, and re-publishing. – Ian Nelson Jun 9 '09 at 9:02

You may have corruption in the SQL Server database that underpins TFS. Do you have a DBA or someone knowledgeable with SQL Server that can run DBCC CHECKDB on the database?

  • Hi Paul, thanks for the suggestion. Yes, we have a couple of DBA's, and I've passed on your suggestion to them. – Col Jun 9 '09 at 8:57

This did turn out to be corrupt iterations in the TFSWarehouse tables. We paid for MS support and they supplied a custom script to correct the issue (basically remap the work items on the corrupt iteration)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.