Introduction

Hello again. In the first part we have done an introduction to TFS 2010 and installation according to dual-server topology. In this post, we will talk about migrating existing TFS databases into TFS 2010 platform. We shall start!

Firstly, before we are getting into details of importing upgrade, I would like to mention other types of scenarios you might encounter:

  • Migrating sources from 3rd party servers as like IBM Rational ClearCase or ClearQuest, Perforce, HP QualityCenter, Subversion: You can use TFS Integration Tool (1) that is developed by MS TFS product group and ALM Rangers. In fact, the tool can be used for synchronization between those platforms as well. It can also be used for import upgrade scenarios which is defined below. Although I have not tried this, it is very promising. For more details please visit here
  • In-Place Upgrade: Simply upgrading from old version of TFS (2005/2008) to 2010 within the same box by selecting Upgrade from TFS Installation wizard. No need to use another tool. For detail please visit 1st part of these series.

How-To

So, here we have TFS 2010 that is up and running well and now wants to import content of TFS 2008 server (applies to TFS 2005 as well). One of the biggest differences between 2010 and old version is that 2010 is based on Team Project Collections (TPCs): One collection reflects a single database and may have 0 or more team projects, independent from other TPC.

Steps:

  1. Inform your team members about process and schedule
  2. Back up all TFS databases (both from and to databases)
  3. RDC to TFS server (where TFS 2010 installed), make sure the account has permissions to from-and-to-databases. I have used tfs.setup account which is local administrator in TFS 2010 machine and has access rights to databases. For detail again please look at the first part.
  4. Run Command Prompt with administration privilege (type “cmd /admin” in run section of start menu)
  5. Tfsconfig.exe is located in “%programfiles%\Microsoft Team Foundation Server 2010\Tools” directory, so please cd to here in the prompt window
  6. Type “Tfsconfig import /sqlinstance:<FromDatabaseServerInstance\FromDatabase> /collectionName:<CollectionName> confirmed”. This will take some time depending on the network and size of the from-database content, in my case it took 45-50 minutes. At the end if you don’t have 0 error/warning means it is succeed!
  7. Configure portal (on SharePoint Foundation) and reports

clip_image002Picture 1: Arguments of tfsconfig.exe

Data Model in TFS 2010

Databases used by TFS 2010 with some notes

  • ReportServer
  • ReportServerTempDB
  • SharePoint_AdminContent_#: Please remember that SharePoint Foundation 2010 used instead of WSS 3.0
  • SharePoint_Config: portal configuration
  • Tfs_Configuration: central database include list of TPCs
  • Tfs_Warehouse: where data about team project collections is stored and optimized for reports
  • Tfs_DefaultCollection: Again, 2010 creates a database per each TPC that stores collection related data (source, work items, builds, etc..).
  • WSS_Content
  • WSS_Search

clip_image004

Picture 2: TFS 2010 SQL Database, Tfs_Warehouse

Health Check

After importing it would be wise to re-run Best Practice Analyzer, just you do before importing process. To do so,

  1. Install Microsoft Team Foundation Server Power Tool (2). You should have this tool not just for server analysis, but for TFS Backups configuration and scheduling, Custom Check-in policies, Team Explorer enhancements, Team Members collaboration, etc.
  2. Start > Programs > Microsoft Team Foundation Server Power Tool > Team Foundation Server Best Practices Analyzer

clip_image006

Picture 3: TFS 2010 Best Practices Analyzer running

Conclusion

In this second part, we have executed a scenario of importing TFS 2005/2008 databases into TFS 2010 Server by using tfsconfig command. Hope you liked it.

Refererences

  1. TFS Integration Platform
  2. Team Foundation Server Power Tools
  3. Team Foundation Server – Migration and Integration
  4. Moving Team Foundation Server