Leon Meijer's Weblog

About my personal life, technology and business/work related...
posts - 128, comments - 334, trackbacks - 0

Upgrading TFS 2005 to TFS 2008

In one of my previous blog posts, I mentioned that I moved my existing TFS 2005 server from a workgroup environment to an Active Directory domain. Today is the day that I decided to upgrade to TFS 2008. In this post I discuss with you the steps that I took and the problems that occurred during the process (and the fixes :-)).

As always, think carefully about your backup plan. In my case - because I'm running VMWare Server - I took a snapshot of the virtual machine. But there are more scenario's possible like Acronis True Image/Norton or simply backing up the TFS/ReportServer/Analysis Services databases.

For this upgrade, I've read and followed the TFS 2008 installation guide. This guide contains a section about upgrading an existing TFS 2005 instance.

  • Check if Windows SharePoint Services 2.0 are running correctly;
  • Check if Reporting Services are running correctly by opening http://localhost/reports;
  • If enabled, disable SQL Server 2005 database mirroring;
  • Backup the TFS databases;
  • Uninstall TFS 2005;
  • Remember the access credentials of Reporting Services to the OLAP cubes of Analysis Services.
    Go to Reporting Services at http://localhost/reports and click on the TfsOlapReportDS data source;

This are my experiences:

  • WSS 2.0 was running correctly;
  • I couldn't connect to Report Services. The reason for this was that the 'Default Website' in IIS was not bound to listen to 127.0.0.1, only to a dedicated other IP-address. I added 127.0.0.1 port 80;
  • Didn't use mirroring;
  • Backups are covered by the VMWare snapshot;
  • Uninstalled successfully;
  • Here I discovered that my previous move was not completely done the right way. The user name was computername\TFSREP instead of domain\TFSREPORTS; the account I created for Reporting Services. For now, I leave this.

Ok, here we go.

I mounted the TFS 2008 Workgroup Edition DVD to my VM and entered the setup. I choose to install Team Foundation Server. In the beginning it's clicking Next, Next, Next etc. Then, it starts detecting the current TFS databases and oops... I got an error.

"TF220064: An error occurred while the Setup program was querying the settings from the server that is running SQL Server Reporting Services. This error is most likely caused by your account not having the required administrative permissions on the server that is running Reporting Services. Click Next to try again. For more information about this error, see the installation logs. For more information about the installation logs, see "Troubleshooting Installation for Team Foundation" in the Team Foundation Installation Guide."

I googled some sites but couldn't really find the answer I was looking for. I started SQL Profiler and monitored all the TFS databases. Then, I went back 1 step in the Team Foundation Server Setup wizard and pressed Next again. I discovered this SQL query:

select url from TfsIntegration..tbl_service_interface si inner join TfsIntegration..tbl_registry_entry re on si.fk_registry_entry_id=re.id and re.type='Reports' where name='ReportsService'

I copied/pasted this SQL to SQL Server Management Studio and executed it. The result I got was a FQDN URL to Reporting Services. If I copy/paste that URL to the web browser I notice that IE asks me for credentials. Not really good. So I changed this value in the tbl_registry_entry table of the TFSIntegration database. The record with name 'ReportsService' has now an 'url' of  http://localhost/ReportServer/ReportService.asmx. Back to the setup, and again pressed Previous and Next. Wooow... it works!

tfs db upgrade

Just to be sure, I restarted the SQL Server Profiler tool in case of any new error.

  • Check the checkbox and press Next to begin with the database upgrade.
    After a minute it tells me: "Your system has passed all the prerequisites." Super!
  • Press Next again;
  • This step is to specify the account where the TFS Web Services runs under. I selected 'Use a system account'. Press Next;
  • This step is to specify the Reporting Services Data Source Account. I entered the account details for the account I have to Reporting Services. In my case: domain\TFSREPORTS and the password. Press Next;
  • The next step is able alerts. TFS can send e-mail notifications when some events happen. Here I entered the info about my SMTP provider. Press Next;
  • Now the TFS setup wizard is ready to install. Press Install. 2219

Just a few seconds later, I got this error:

"Error 29109.Team Foundation Report Server Configuration: SQL Reporting Services configuration encountered an unknown error. Verify that you have sufficient permissions to configure SQL Reporting Services, and try again."

The dialog box comes with a nice Retry button.  Let's try it :-). A dialog showing me the DB is being upgrade shows up.

upgrading tfs version

upgrading tfs version 2

The profiler shows me hundreds of lines. And voila, now more error 29109. But, I was too optimistic. A new error comes up. And what do we get now?

Error 32000.The Commandline '"C:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Tools\TfsDb.exe" upgrade /server:"<computername>" /property:"TFS_SERVICE_ACCOUNT=NT AUTHORITY\NETWORK SERVICE;TFS_REPORTING_ACCOUNT=,<domain>\TFSREPORTS;LCID=1033;VSTF_AS_INSTANCE=<computername>;VSTF_AS_DATABASE=TFSWarehouse;VSTF_AS_ACCOUNT=" /showui:263404' returned non-zero value: 100.

And again a nice Retry button. Let's try the same trick again. The complete upgrade database process starts again. VersionControl, Build, WorkItem, Integration DB etc etc. The error occurs when it's trying to upgrade the Warehouse database. Let's try Google.com again. The first 5 hits didn't gave me a satisfying answer so it was time to look myself.

  • Open SQL Server Management Studio with the Run As command and run it as domain\TFSReports;
  • Select Analysis Services;
  • And what happens, I can't see the  TFSWareHouse warehouse :-(. Probably no permissions.

I closed Management Studio and opened a new one with my current credentials. This are the same credentials as the one I'm using for the TFS Setup (with Administrator rights). Now I can see the TFSWareHouse and I have to figure out how to grant domain\TFSReports the appropriate permissions.

  • Right-click the root node in Object Explorer, showing the name of your server and choose Properties;
  • Go to the Security page and add the domain\TFSReports, domain\TFSService and the account where the TFS Setup runs under;
  • Expend the warehouse, expend Roles;
  • Open the properties of the TfsWareHouseDataReader;
  • Go to the page 'Membership';
  • Add the domain\TFSReports, domain\TFSService and the account where the TFS Setup runs under

Note. If you want a more detailed error instead of Error 32000, you can run the TfsDb.exe application via the Command Prompt. The verbose output is very useful.

Now let's hit that 'Retry' button again and guess what... it worked!! :-) The setup process continues... but not for long :-(

Error 32000.The Commandline '"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\Bin\Stsadm.exe" -o upgrade -forceupgrade -url http://localhost:80 -quiet' returned non-zero value: -2130246810.

Hmm I'm getting really frustrated now. Thank god somebody else had the same error and found the solution. The problem is that the SharePoint site in IIS is configured to 1 or more specific IP-addresses. For the SharePoint upgrade process, this has to be set to 'All unassigned'.

  • Go to IIS;
  • Expend Websites;
  • Right-click the 'Default Web Site', open Properties;
  • Set the IP-address to '(All unassigned)'

Again a Retry button. Let's press it!

Yahoo!!! It works.

tfs 2008 installed

Print | posted on Wednesday, March 05, 2008 11:46 PM | Filed Under [ Technology ]

Powered by: