Rebuild the Data Warehouse and Analysis Services Cube

Whenever you move, restore, rename, or fail over the data-tier server for Team Foundation, you must rebuild the warehouse and cube to access high-level reports. Also, if you move or delete a team project collection, you must rebuild the warehouse and cube. The warehouse for Team Foundation aggregates all operational data from other subsystems in Visual Studio Team Foundation Server. The warehouse corresponds to the relational database, Tfs_Warehouse, and the cube corresponds to the SQL Server Analysis Services database, Tfs_Analysis

When you rebuild the warehouse or cube, Team Foundation Server performs the following sequence of actions:

  • Takes the databases offline.

  • Drops the schema for both databases.

  • Re-creates the schema for both databases.

  • Brings both databases back online.

  • Restarts the warehouse adapter jobs.

  • Processes the cube according to its regular processing interval.

With the rebuild operation, you re-create both the relational database and the cube. Team Foundation Server rebuilds the relational database from the operational data stores. It then re-creates the SQL Server Analysis Services cube and processes the cube to populate it by using data from the relational database. If you want to rebuild just the cube, you can use the TFSConfig RebuildWarehouse command-line tool. For more information, see RebuildWarehouse Command.

Important

You should not have to rebuild the data warehouse during normal operations. Depending on the amount of data in the data warehouse, the rebuild operation can take several hours to finish, during which time reports are not available.

If you encounter schema conflicts, you cannot resolve this by rebuilding the data warehouse. To modify the reporting configuration for team project collections, you can use the Edit function that is provided on the Reporting page of the administration console for Team Foundation. Also, you can manually process the warehouse and cube on demand. For more information, see the following topics:

In this topic

To rebuild the data warehouse for Team Foundation, you must perform the following sequence of steps:

  1. Verify That Services and Application Pools are Running and That TCP/IP Is Enabled for SQL Server

  2. Rebuild the Data Warehouse

  3. Restart Services

  4. Verify That Reports Can Be Accessed

Required Permissions

To perform these procedures, you must have the following permissions:

  • You must be a member of the sysadmin security group on the server or servers that are running the instance of SQL Server that hosts the databases for Team Foundation Server.

  • You must be a member of the sysadmin security group on the server for the Analysis Services database for Team Foundation.

  • You must be a user of the Tfs_Warehouse relational database.

  • You must be a member of the TFSEXECROLE database role.

  • You must be a member of the Team Foundation Administrators security group and the Administrators security group on the server or servers that are running the administration console for Team Foundation.

  • Your server-level Administer warehouse permission must be set to Allow.

  • Your View project-level information permission on the team project must be set to Allow to run and view a report. Also, you must be a member of the Browser role in SQL Server Reporting Services.

For more information, see Team Foundation Server Permissions.

In addition to these permissions, you might need to address the following requirements on a computer that is running Windows Server 2008 or Windows Vista:

  • To follow a command-line procedure, you might need to open an elevated Command Prompt by clicking Start, right-clicking Command Prompt, and clicking Run as Administrator.

  • To follow a procedure that requires Internet Explorer, you might need to start it as an administrator by clicking Start, clicking All Programs, right-clicking Internet Explorer, and then clicking Run as administrator.

  • To access Report Manager, reports, or Web sites for Reporting Services, you might need to add these sites to the list of trusted sites in Internet Explorer or start Internet Explorer as an administrator.

For more information, see the Microsoft Web site.

Verify That Services and Application Pools are Running and That TCP/IP Is Enabled for SQL Server

The services that SQL Server requires must be running for you to complete the steps in this procedure. You stop Reporting Services so that users do not access reports while you are rebuilding the data warehouse. Also, for a dual-server deployment, the TCP/IP protocol must be enabled for each instance of a SQL Server database.

Note

By default, TCP/IP is disabled when you install SQL Server.

To verify that services and application pools are running and that TCP/IP is enabled for SQL Server

  1. Log on to the appropriate server, open Computer Manager, and then verify that the services and application pools in the following table are running:

    Log on to the server that hosts this program

    Component

    SQL Server Analysis Services

    • SQL Server Analysis Services (MSSQLSERVER or TFSInstance).

    Team Foundation databases

    • SQL Server (MSSQLSERVER or TFSInstance).

    • SQL Server Agent (MSSQLSERVER or TFSInstance).

    Application tier

    • Microsoft Team Foundation Server Application Pool.

    For more information, see Stop and Start Services, Application Pools, and Websites.

  2. Log on to the server that hosts Reporting Services, and stop the following services:

    • SQL Server Reporting Services (TFSINSTANCE).

    • ReportServer or ReportServer$InstanceName (application pool).

      Note

      You manage ReportServer for SQL Server 2005 but not for SQL Server 2008.

  3. Make sure that TCP/IP has been enabled for SQL Server on the data-tier server. For more information, see How to: Enable the TCP/IP Protocol for a Database Instance.

Rebuild the Data Warehouse

To rebuild the data warehouse

  1. Open the administration console for Team Foundation.

    For more information, see Open the Team Foundation Administration Console.

  2. Under Team Foundation, expand the name of the server, expand Application Tier, and then click Reporting.

  3. Under Reporting, click Start Rebuild.

    The Take Offline dialog box opens.

  4. Click OK to take the data warehouse and Analysis Services cube offline.

    The Rebuild the Warehouse and Analysis Services Databases dialog box opens.

  5. Click OK to initiate the rebuild process.

    The rebuild process starts first for the warehouse and then for the cube. The time that is required to rebuild the databases is based on the amount of data that is stored in the data warehouse. When the databases have been rebuilt, the jobs for processing the databases are automatically started.

    Note

    While the warehouse and the cube are being rebuilt, the administration console for Team Foundation may stop responding. You may need to refresh the administration console after the warehouse and the cube have been rebuilt.

  6. (Optional) To check the status of the rebuild process, you can use the Warehouse Control Web service. For more information, see Manually Process the Data Warehouse and Analysis Services Cube for Team Foundation Server.

Restart Services

To restart services

  • Log on to the server that hosts Reporting Services, open Computer Manager, and then start the SQL Server Reporting Services (TFSINSTANCE) service.

Verify That Reports Can Be Accessed

To verify that reports can be accessed

  1. Log on to the server that hosts Reporting Services, open Internet Explorer, type the following string in the Address bar, and then press ENTER:

    https://localhost/Reports

    Note

    You may need to start Internet Explorer as an administrator by clicking Start, clicking All Programs, right-clicking Internet Explorer, and then clicking Run as administrator.

    If you have deployed a named instance on the data-tier server, type the following string instead:

    **https://localhost/Reports_**TFSInstance

    The Report Manager page opens.

  2. In Contents, click TFSReports.

  3. In TFSReports, click the folder of the team project collection that stores your team project.

  4. In the project collection folder, click the folder that corresponds to your team project.

  5. In the team project folder, click the folder that contains a report that you want to view.

  6. Click a report, and verify that the report appears correctly.

  7. Check the date when the report was last updated. This information appears in the lower-left corner of the report.

See Also

Tasks

Move from a Single-Server to a Dual-Server Deployment

Reference

RebuildWarehouse Command

Concepts

Components of the Data Warehouse for Team Foundation

Managing the Data Warehouse and Analysis Services Cube