image

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

  • Go to SQL Server and locate the folders contains TFS_Analysis database C:\Program Files\Microsoft SQL Server\MSAS10_50.MSSQLSERVER\OLAP\Data
  • Delete following files and folder: Tfs_Analysis.0.db, CryptKey.bin, Tfs_Analysis.0.db
  • Restart SQL Server Analysis Database service

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

  • Launch TFS Admin Console | Application Tier | Reporting, in the right panel, click Edit to open the Reporting window.
  • Under the Analysis Services tab, input the Tfs_Analysis under Database textbox, and re-provide the required account under Account for accessing data source.
  • Click Ok to generate the Tfs_Analysis database in Analysis Services.
  • Click Start Jobs and Start Rebuild to rebuild warehouse and the Analysis Services database.  Similarly recreated Tfs_Warehouse database under Warehouse tab in Reporting window.
  • Monitor the progress using http://localhost:8080/tfs/TeamFoundation/Administration/v3.0/WarehouseControlService.asmx
    • Open GetProcessingStatus and hit Invoke. Refresh until JobProcessingStatus=”Idle”.