Rebuilding TFSWarehouse

by KodefuGuru 16. June 2009 18:34

I was tasked today with fixing the reporting in Team Foundation Server. It hadn’t worked since an upgrade from 2005 to 2008, and it the repair of it was low priority.

Since I worked with alternate software in my previous jobs, I had to research the possible problems. The first step was to figure out what the actual error message was. Browsing the TFS portal from my development box didn’t reveal the necessary information, so I had to browse the portal from the server. Luckily, I had requested the role of configuration management when I joined the team so I had permissions. Here’s the error message.

Reporting Services Error

An error has occurred during report processing. (rsProcessingAborted)
Query execution failed for data set 'IterationParam'. (rsErrorExecutingCommand)
The Team System cube either does not exist or has not been processed.

I binged the last line to discover that it was related to the TFSWarehouse. Typically, this is periodically refreshed by the Visual Studio Team Foundation Server Task Scheduler service, but obviously it wasn’t doing its job. The suggestion I found was to refresh it by using the web services under http://ServerName:Port/Warehouse/v1.0/warehousecontroller.asmx. When you’re there, you invoke the Run operation then invoke the GetWarehouseStatus operation occasionally until it returns Idle.

Well, it returned Idle immediately. I checked the TFSWarehouse database to see if anything had happened, but the latest rows were from the date of the upgrade.

More searching led me to discover a utility called SetupWarehouse.exe located in %ProgramFiles%\Microsoft Visual Studio 2008 Team Foundation Server\Tools.

Since I saw that it would actually rebuild the database, I was sure to do full backups as a precautionary measure. I then executed the commands to rebuild the database and OLAP.

Database:
setupwarehouse -rebuild -mturl "http://ServerName:Port" -s ServerName -d TFSWarehouse -c wareHouseSchema.xml -a TFSServiceAccount -ra TFSReportAccount -edt TfsBuild

OLAP:
Setupwarehouse -o -s ServerName -d TFSWarehouse -c warehouseSchema.xml -mturl "http://ServerName:Port" -a TFSServiceAccount -ra TFSReportAccount

I then executed the the operations on the Warehouse web service. It took around an hour for it to complete, but it was successful.

Tags: , ,

Build Ninja

Comments

6/16/2009 6:37:41 PM #

trackback

Trackback from DotNetKicks.com

Rebuilding TFSWarehouse

DotNetKicks.com

6/16/2009 6:40:40 PM #

trackback

Trackback from DotNetShoutout

Rebuilding TFSWarehouse

DotNetShoutout

7/2/2009 6:23:06 PM #

Justin James

This was pretty timely for me, thanks! I caught it a couple of weeks ago, and it stuck with me because I had noticed that I was getting TFS Warehouse errors on my TFS server. Today, one of the developers asked about why nothing was coming up in the reports. After a lot of digging, I discovered that the report had a timestamp of the warehouse on it... mid-May. I followed these directions, and hooray, the reports work. Now, I see that the default reports are not what they want, so I can look forwards to trying to figure out report building. Creek, meet canoe, no paddle. Smile

J.Ja

Justin James United States

7/2/2009 9:03:56 PM #

Chris

Cool, I'm glad these instructions helped out. I blog about all the crazy stuff I come across because I have this belief that I'm probably not the only one.

Chris United States

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.6.0.0
Theme by Mads Kristensen

Whois KodefuGuru

Chris Eargle

Chris Eargle
.NET Community Champion

LinkedIn Twitter Technorati Facebook

MVP - Visual C#

 

INETA Community Champions
Friend of RedGate
Telerik .NET Ninja
Community blogs & blog posts

I am a #52er


World Map

RecentComments

Comment RSS

Tag cloud

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2010