Experiences of an Inland Empire Dad

Team Foundation Server 2010–Analysis Database Corrupted, Rebuild It

Most large companies that are Microsoft centric rely on TFS for their source control, but it also does so much more (as long as you use it to track work items ad other tasks).  Part of TFS is a SharePoint component that utilizes the platform to create a project portal where various metrics can be displayed in a dashboard.  This works fairly well, but occasionally we’ve found that the TFS analysis database TFS_Analysis has issues and we have to go in and do a little fiddling.  Generally I get the call because I am “The SharePoint Guy” and it somehow relates to SharePoint…

Error Scenarios

Error 1: Message on the portal stating:

Project data is unavailable at this time. As a result, all reports on this dashboard have been hidden. After you have created data in your team project and the warehouse has been processed, reports will be available.

Error 1: Message in Excel Services

Unable to get the required information about this cube. The cube might have been reorganized or changed on the server. The PivotTable was not refreshed.

Error 2: Error message in the Event Viewer:

Detailed Message: TF221122: An error occurred running job Incremental Analysis Database Sync for team project collection or Team Foundation server TEAM FOUNDATION.
Exception Message: Error encountered when creating connection to Analysis Services. Contact your Team Foundation Server administrator. (type AnalysisServiceConnectionException)

Error 3: Exception Message:

File system error: The following file is corrupted: Physical file: \\?\C:\Program Files\Microsoft SQL Server\MSAS10_50.MSSQLSERVER\OLAP\Data\Tfs_Analysis.0.db\Dim Team Project.0.dim\330.ProjectPath.ksstore. Logical file .
Errors in the metadata manager. An error occurred when loading the Team Project dimension, from the file, ‘\\?\C:\Program Files\Microsoft SQL Server\MSAS10_50.MSSQLSERVER\OLAP\Data\Tfs_Analysis.0.db\Dim Team Project.330.dim.xml’.
Errors in the metadata manager. An error occurred when loading the Team System cube, from the file, ‘\\?\C:\Program Files\Microsoft SQL Server\MSAS10_50.MSSQLSERVER\OLAP\Data\Tfs_Analysis.0.db\Team System.1191.cub.xml’.
(type OperationException)

Generally it’s not worth the time to try and figure out what went wrong.   It is much simpler in these cases to just rebuild your Cube and Warehouse.

To rebuild the cube and warehouse, following these steps:

1. Delete analysis database TFS_Analysis

2. To recreate the Tfs_Analysis database, please refer to the following steps: