Sometimes the burndown chart for a sprint may not look the way you expect, even after sorting out all the hours and the remaining effort involved. If they do not look correct then there is problem something wrong with the data warehouse of the TfsWarehouse database.
The first thing to do is to see how recently the warehouse was updated. The way to do this is to log into the SQL server of TFS (erither using RDP or direct from the SQL Management Suite) and run the following query on the TfsWarehouse database:
use [TFSWarehouse]
select top 1 __LastUpdatedTime from dbo.[Work Item History] with (nolock) order by __LastUpdatedTime desc
select * from _WarehouseConfig
The output will include something similar to the following:
__LastUpdatedTime
-----------------------
2007-08-06 17:58:37.560
This was a scenario that happened at one of our clients and we were investigating this problem on Wed 15th August. This showed that the warehouse had not updated for at least 6 days!
The immediate reaction might be to rebuild the Warehouse, indeed this is what I did, however this does not address the issue. The way to fix this problem is to check the analysis service of SQL running on the data-tier of the TFS server. It may have stopped running, in which case the reason why it stopped needs to be investigated, however if it is running restart it.
Once the service has restarted check the System Event log, it is possible that although it has started it is moaning about some files in the filesystem. This is the error that we got:
Event Type: Error
Event Source: MSSQLServerOLAPService
Event Category: (289)
Event ID: 18
Date: 15/08/2007
Time: 14:20:45
User: N/A
Computer: TFS-SERVER
Description:
Errors in the metadata manager. An error occurred when instantiating a metadata object from the file, '\\?\C:\Program Files\Microsoft SQL Server\MSSQL.2\OLAP\Data\TfsWarehouse.0.db\Team System.12604.cub.xml'.
Using explorer on the server go to the location specified in the log file. In our case there were a bunch of 0 byte XML files that had created; strangely these files were compressed. Any XML file that is corrupt or does not contain anything will cause problems for the update process. Delete these files (as specified in the event log) and restart the service which should now start cleanly.
The last step in the process is to get the TFS system to update the warehouse. Use the web service for TFS to invoke this, BUT bear in mind that it could well take a long time and on a busy TFS server it maybe better to do outside of hours - although remember that TFS itself will try to updated the warehouse every hour by default.