Microsoft KB Archive/921312

= How to add the Area Path dimension attribute to the Area dimension in the Microsoft Visual Studio 2005 Team Foundation Server data warehouse Team System cube =

Article ID: 921312

Article Last Modified on 10/8/2006

-

APPLIES TO


 * Microsoft Visual Studio 2005 Team Foundation

-





INTRODUCTION
Important This article contains information about how to change the server configuration. Before you change the server configuration, verify that you have a backup of the operational database as a precautionary measure.

This article describes how to add the Area Path dimension attribute to the Area dimension in the Team System cube. The Team System cube is found in the data warehouse that is part of Microsoft Visual Studio 2005 Team Foundation Server.

The Area dimension enables queries to return all the items under a particular node in the area classification. However, to list a selection of items and to include the area path for each item, the Area Path dimension attribute must be added to the Area dimension.



MORE INFORMATION
Warning If you change the server configuration incorrectly, you can cause serious problems that may result in system instability, data corruption, and data loss. Follow the steps in this article exactly. Edit the database at your own risk.

Note Always back up the operational database before you edit it.

In the first release of Visual Studio 2005 Team Foundation Server, you cannot include the Area Path dimension attribute for the Area dimension when you develop work item reports from the Team System cube in the data warehouse. However, this action is possible in the release to manufacturing (RTM) version of Visual Studio 2005 Team Foundation Server.

To add the Area Path dimension attribute to the Area dimension, you must change the WarehouseSchema.xml file. Then, you must execute the SetupWarehouse command to update the Team System cube.

To add the Area Path dimension attribute to the Area dimension, follow these steps.

Note To enable the Area Path dimension attribute for the data warehouse Team System cube, you must rebuild the data warehouse database. The data warehouse database is dropped and re-created. Then, the adapters run to populate all the data. We recommend that you back up the data warehouse Team System database and the Team System cube before you follow these steps.

For more information about how to restore Team Foundation Server data, visit the following Microsoft Developer Network (MSDN) Web site:

http://msdn2.microsoft.com/en-us/library/ms252458.aspx

 Open the C:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\Tools directory. Then, open the WarehouseSchema.xml file in Notepad.  Locate the following code in the WarehouseSchema.xml file:  Area Path Area Path nvarchar 4000 <RelationalOnly>true</RelationalOnly> </Field> </li>  Change the XML code that you located in step 2 so that it matches the following code: <Field> Area Path</FriendlyName> Area Path</Name> nvarchar</Type> 4000</Length> <RelationalOnly>False</RelationalOnly> </Field> </li> Save the WarehouseSchema.xml file, and then close Notepad.</li> Click Start, click Run, type cmd, and then click OK.</li> Type the following, and then press ENTER:

cd /d C:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\Tools

</li> Type the following, and then press ENTER to rebuild the warehouse database:

setupwarehouse -rebuild -mturl  -s   -d TFSWarehouse -c wareHouseSchema.xml -a   -ra   -edt

Note To obtain more information about the parameter switches, type setupwarehouse /? , and then press ENTER.

When the command has finished running, you receive the following message:

SetupWarehouse: Warehouse updated successfully.

</li> Click Start, click All Programs, click Microsoft SQL Server, and then click SQL Server Management Studio.</li> In the Server type list, select Analysis Server. In the Server name list, select the server that you want. In the Authentication list, select the authentication scheme for the server. Provide a valid user name and password if it is required by the instance of SQL Server, and then click Connect.</li> Expand Databases, right-click TFSWarehouse, and then click Process.</li> In the Process Database dialog box, click OK to process the warehouse.</li> When the processing is finished, click Close in the Process Progress dialog box.</li></ol>

You can now access the Area Path dimension attribute for the Area dimension in the Team System cube.

Note After you rebuild the Team System cube, you may have to wait several minutes before you can browse the Team System cube.

When you slice by the Area Path dimension attribute, you can see the full paths of work items that are included in totals for the Current Work Item Count measure, for the Cumulative Count measure, and for other work item measures.

You may want to hide the Area Path dimension attribute from Microsoft Excel and from other front-end tools. However, you may still want to enable the attribute so that you can use the attribute in hand-coded XML. To do this, repeat the steps in this section. Then, add the following tag to the Field tag for the Area Path dimension attribute: <Visible>false</Visible> The Field tag resembles the following: <Field> Area Path</FriendlyName> Area Path</Name> <Type>nvarchar</Type> <Length>4000</Length> <RelationalOnly>False</RelationalOnly> <Visible>false</Visible> </Field> After you add this tag, you can use the Area Path dimension attribute in hand-coded XML when you build a query that includes the Work Item ID dimension and the Area dimension.

For example, when you build reports for a single Work Item ID dimension that is located in the /a/b/c folder, the default query results show an instance of the Area dimension in each /a folder, in each /a/b folder, and in each /a/b/c folder. When you use the Area Path dimension attribute, the only Area Path dimension attribute that slices the work item fact is the /a/b/c path.

<div class="references_section">