This documentation is archived and is not being maintained.


Use SetupWarehouse to rebuild the online analytical processing (OLAP) or the relational databases.

The SetupWarehouse command-line utility is located in <drive>:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\Tools on Team Foundation Server application tier.

Required Permissions

To use the SetupWarehouse command, you must be a member of the sysadmin security group for the SQL Server on the Team Foundation data-tier server. For more information, see Team Foundation Server Permissions.

SetupWarehouse [-v] [-o] -s ServerName -d Database -c ConfigFile -a AccountName -ra DataReaderAccountName [-l LogFile] [-mturl MidTierUrl] [-edt TeamBuildDbName] -rebuild


Option / Argument Description


Optional. This option provides verbose output. If the -l option is specified, the output is written to the log file.


Required. When this option is used, only the OLAP database is created. Only the warehouse cube is rebuilt.

-s ServerName

Required. The data-tier server name.

-d Database

Required. The warehouse database name.

-c ConfigFile

Required. The warehouse schema configuration XML file.

-a AccountName

Required. The service account name. In domain \user format.

-ra DataReaderAccountName

Required. The reader account name. In domain\user format.

-l LogFile

Optional. Log file for output.

-mturl MidTierUrl

Required. The URL of the Team Foundation Server domain, for example, http://machine1:8080.

-edt TeamBuildDbName

Required. The name of the Team Foundation Build database.


Required. Forces the warehouse database to be rebuilt. This repopulates all the data in the warehouse.

The Team Foundation Server warehouse has a relational database and an OLAP database. Setupwarehouse, Team Foundation Server's warehouse setup tool, can be used to rebuild the OLAP database or the relational database. This is useful in backup/restore scenarios, for example, disaster recovery, moving servers, etc. For more information, see How to: Restore Team Foundation Server Data.

Supported Usage

The supported combinations for Setupwarehouse.exe are:

  • Rebuilding OLAP (options -v and -l are optional):

    Setupwarehouse -o -s ServerName -d TFSWarehouse -c warehouseSchema.xml -a TFSServiceAccount -ra TFSReportAccount
  • Rebuilding the database(options -v and -l are optional):

    setupwarehouse -rebuild -mturl MidTierURL -s ServerName -d TFSWarehouse-c wareHouseSchema.xml -a TFSServiceAccount -ra TFSReportAccount -edt TeamBuildDataBase

Running the following command rebuilds the Analysis Services data cube from the underlying TFSWarehouse database.

      > setupwarehouse -o -s ServerName -d TFSWarehouse -c warehouseschema.xml -a TFSServiceAccount -ra TFSReportAccount