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
Description:
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=9.0.0.0, 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):
http://msdn.microsoft.com/en-us/library/ms400783.aspx
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?
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)