Since shipping TFS 2005, I’ve answered several questions from customers on how to perform various administrative operations on the TFS warehouse. I thought that I would take a moment to describe some of the most common operations that a user may need to perform at some point. For each administrative operation, I describe the minimum permissions you will need to perform the operation and the list of steps that you will need to run. The steps below are written for TFS 2008, but also will be very similar for those still using TFS 2005. If you need help performing an operation not on this list, let me know.
How to force an update of the TFS Data Warehouse and OLAP Cube
Performing this action will trigger the TFS Warehouse adapters to update Relational Data Warehouse and OLAP cube. This includes performing any necessary schema changes along with processing the OLAP cube.
1. Ensure you have the necessary permissions.
a. To invoke methods on the WarehouseController web service, you will need to have ‘Administer warehouse’ permission in TFS. To view or grant this permission:
i. Connect to TFS from Team Explorer
ii. Right click on the TFS server name and select, “Team Foundation Server Settings -> Security…”
iii. Select the appropriate user or group from the “Users and Groups” list box in the top portion of the screen
iv. Select the “Allow” checkbox next to the “Administer warehouse” permission in the bottom portion of the screen
2. Check the current status of the Warehouse:
a. Navigate to
http[s]://<tfsserver>:<port>/Warehouse/v1.0/warehousecontroller.asmx
b. Select “GetWarehouseStatus” and click “Invoke”
c. The result will be one of the following:
Idle
RunningAdapters
ProcessingOLAP
Blocked
3. Execute the ‘Run’ method of the WarehouseController to force the update.
Note: the result from 2(c) needs to be “Idle”.
a. Navigate to
http[s]://<TFS_Server>:<Port>/Warehouse/v1.0/warehousecontroller.asmx
b. Click on ‘Run’ and then click ‘Invoke’
c. Verify that the result returns ‘true’
How to view and change the update interval for the TFS Data Warehouse
The default interval for updating the TFS Data Warehouse is 3600 seconds (every hour).
1. Ensure you have the necessary permissions.
a. To invoke methods on the WarehouseController web service, you will need to have ‘Administer warehouse’ permission in TFS. To view or grant this permission:
i. Connect to TFS from Team Explorer
ii. Right click on the TFS server name and select, “Team Foundation Server Settings -> Security…”
iii. Select the appropriate user or group from the “Users and Groups” list box in the top portion of the screen
iv. Select the “Allow” checkbox next to the “Administer warehouse” permission in the bottom portion of the screen
2. Execute the ‘ChangeSetting’ method of the WarehouseController to configure the warehouse update interval.
a. Navigate to
http[s]://<TFS_Server>:<Port>/Warehouse/v1.0/warehousecontroller.asmx
b. Click on ‘ChangeSetting’
c. Enter ‘RunIntervalSeconds’ as the ‘settingID’ and the number of seconds that you want to change the interval to for ‘newValue’
d. Verify that the result returns ‘true’
3. You can verify the change by viewing the current update interval as follows:
a. Navigate to
http[s]://<TFS_Server>:<Port>/Warehouse/v1.0/warehousecontroller.asmx
b. Click on ‘GetNextInterval’
c. Enter “0” (without the quotes) as the ‘lastInterval’
d. The result will be the warehouse update interval in seconds
How to change the type of automatic cube processing for the TFS OLAP Cube
By default, the TFS OLAP cube is configured to use incremental processing as the type of cube processing. The warehouse controller supports 3 types of cube processing that you can choose from to have your cube processed: Full, Incremental, None.
1. Navigate to the web.config file that is used by the WarehouseController web service.
2. Modify the web.config to add the following to the <appSettings> section:
<add key=”ProcessingType” value=”Full” />
How to enable tracing for the TFS Adapters without recycling the application pool
Enabling tracing is often helpful in debugging, but enabling it from the appropriate web.config files will require the application pool to recycle for the changes to take effect. The following method enables tracing without disrupting the system.
1. Ensure you have the necessary permissions.
a. To perform this procedure, you must be a member of the Administrators group on the TFS application tier server. For more information, see Team Foundation Server Permissions
2. Navigate to
http[s]://<tfsserver>:<port>/Warehouse/tftrace.aspx?All=Verbose
How to rebuild the TFS Relational Data Warehouse
Performing the following steps will simply drop and recreate the TFSWarehouse SQL database, but will not pump data into the database. Database processing will automatically be scheduled by the “Visual Studio Team Foundation Server Task Scheduler” windows service which is installed on the TFS Application Tier. You can force an update of the TFS data stores (TFS Data Warehouse and OLAP Cube) by following the steps in the section above.
1. Ensure you have the necessary permissions. The following are the minimum set of permissions needed:
a. You will need to have SQL ‘ServerAdmin’ permission on the SQL server that TFS is configured to use.
2. Execute SetupWarehouse with the “-rebuild” option to rebuilt the TFS Relational Data Warehouse
a. On the AT you will find SetupWarehouse.exe in %ProgramFiles%\Microsoft Visual Studio 2008 Team Foundation Server\Tools
b. Run “SetupWarehouse -s <DT Server Name> -d TFSWarehouse -c warehouseschema.xml -a <Service Account> -ra <Reporting Account> -mturl <TFS URL> -rebuild -edt TfsBuild”
How to rebuild the TFS OLAP Cube [on TFS Data Tier]
Performing the following steps will simply [re]create the TFS OLAP cube schema on the TFS DT but will not process the database. Database processing will automatically be scheduled by the “Visual Studio Team Foundation Server Task Scheduler” windows service which is installed on the TFS Application Tier. You can force an update of the TFS data stores (TFS Data Warehouse and OLAP Cube) by following the steps in the section above.
1. Ensure you have the necessary permissions. The following are the minimum set of permissions needed:
a. TFS DT SQL Instance
i. Server login rights to the TFS DT SQL Instance
ii. User on the TFSWarehouse relational database
iii. Member of the TFSEXECROLE database role
b. TFS DT AS Instance
i. Member of the server role
2. Execute SetupWarehouse with the “-o” option to only rebuild the TFS OLAP cube:
a. On the AT you will find SetupWarehouse.exe in %ProgramFiles%\Microsoft Visual Studio 2008 Team Foundation Server\Tools
b. Run “SetupWarehouse -o -s <DT Server Name> -d TFSWarehouse -c warehouseschema.xml -a <Service Account> -ra <Reporting Account> -mturl <TFS URL>”
How to move the TFS OLAP Cube [off TFS Data Tier]
http://msdn2.microsoft.com/en-us/library/aa721760(vs.80).aspx
Enjoy!