Thursday, October 15, 2009

TFS – Forcing refresh of reports

The data that is used by TFS in its reports is stored in a SQL Analysis Services database. This data is stored in an OLAP cube. The cube is not update in real-time, which is the reason that TFS sometimes shows out of date information in its reports.

Fortunately, there is a way to request* for the cube to be updated. To do this, you need to log in to your TFS server. Open a browser and browse to:

http://localhost:8080/Warehouse/v1.0/WarehouseController.asmx
Select the “Run” method, then click the Invoke button.

You should receive a XML response with the value true in it. A value of true signals that the OLAP update process has been started. Now to determine when the update process has completed, you can invoke the “GetWarehouseStatus” method. This will return the values “Idle” or “Processing Olap”. The ware-house is refreshed once you get the Idle response status. 

*The reason that I said “request” is that in practice I have found that Sql Server Analysis Services does not always begun refreshing the cube and will always return the Idle response. In this case – go home and come back the next day – by when it should update the cube.

1 comment:

Unknown said...

Hey, Thanks for the great info. This can come in handy for the "City" that I work for ;).
-Mark