Rules to Better TFS 2012 Migration

​Since 1990, SSW has supported the developer community by publishing all our best practices and rules for everyone to see. 

If you still need help, visit Application Lifecycle Management and book in a consultant.

Hold on a second! How would you like to view this content?
Just the title! A brief blurb! Gimme everything!

 Migrating from TFS 2010 to TFS 2012 (or from TFS 2012 to TFS 2012 Update 2)

​Upgrading Team Foundation Server can be a daunting task. Be assured that things have become easier and if you follow this guide, it will minimize your downtime.

In this page we will look at upgrading an existing TFS 2010 server to a new TFS 2012 server. In this walkthrough, we assume you are currently using a single server configuration, but might want to separate your SQL Server from your TFS server. We also assume you have a DNS entry setup for external access at tfs.northwind.com.

  1. Do you get a new TFS 2012 Server ready?

    1. Prepare a new image. We recommend running Windows 2008 R2 Server x64 using Hyper-V Manager. Your options are:
      1. Manually build a server
      2. Use a syspreped image (this will be quicker)
      3. System Center Virtual Machine Manager (recommended, quickest)
    2. Add the roles
      1. Application Server
      2. IIS
    3. Install SQL Server 2012 components for reporting and analysis (on the TFS server)
      1. Install (but don't configure) SQL Server 2012 Reporting Services
      2. Install (but don't configure) SQL Server 2012 Analysis Services
    4. You'll also need a SQL Server instance for the TFS databases if you don't already have one
      1. Install SQL Server 2012 x64 default configuration
  2. Do you know how to upgrade your TFS2010 databases? (the big one)

    We recommend doing a move to a new environment because it has a much easier rollback path if something goes wrong.

    Note that these steps will also work for upgrading from TFS 2012 RC to RTM, or RTM to Update 1.

    ​These are the steps to migrate and upgrade to a new environment:

    1. Send an email to let everyone know the TFS server will be offline.
    2. Take the TFS 2010 server offline
    3. Copy the TFS 2010 database backups to the TFS server or the new SQL Server instance. Make sure the URL is accessible from the TFS server via a network share.
    4. Install Team Foundation Server 2012 or TFS 2012 Update 1 (see Damian Brady's experiences).
    5. Make sure you have access to coffee while it's installing - it could take a while!
      coffee.png
    6. After the install has completed, the Team Foundation Server Configuration Center will start
    7. Select Upgrade | Start Wizard
      tfs_upgrade_existing.png
    8. Launch the Database Restore tool by clicking on the link
    9. If necessary, change the Target SQL Server Instance and click Connect
    10. In the Restore Database screen, Browse, then navigate to the folder with your database backups. Make sure all of them are ticked, then click Restore.
      tfs_restore_dbs.png
    11. Click Close, then click Next in the Upgrade Wizard
    12. Choose the configuration database by specifying the SQL Server Instance and clicking List Available Databases
    13. Check "By checking this box, I confirm that I have a current backup.", then click Next
      tfs_config_db.png
    14. Leave Network Service as the service account for the Application Tier, then click Next
    15. Check the checkbox to confirm we want to configure Reporting Services, then click Next
    16. Make sure the Reporting Services instance and URLs are correct, then click Next
      tfs_config_reporting.png
    17. Update the SQL Server Instance for our Warehouse Database, and click Test to test the connection
    18. Click List Available Databases and check the Tfs_Warehouse database is shown, then click Next
      tfs_warehouse.png
    19. Click Next on the Analysis Services page
    20. Provide details of the TFSService account your reports will run as then click Next
      tfs_reports_run_as.png
    21. Check the checkbox to say we want to configure SharePoint, then click Next
    22. Choose "Use current SharePoint settings", then click Next
      tfs_sharepoint.png
    23. Confirm the details on the Summary page and click Verify
      tfs_summary.png
      Note: At this point, you may be asked to reboot and start the wizard again.  Don't despair - it's quicker the second time!
    24. Once you have all green ticks, click Configure
      tfs_final_configure.png
    25. Have a coffee
      coffee.png
    26. Click Next
      tfs_upgrade_complete.png
    27. Click Close, then Close again.
    28. Change the DNS entries for your TFS server to point to the new TFS 2012 server
      tfs_dns.png
      Note: It's a good idea to get the SysAdmins involved at this stage
  3. Do you plan your additional steps?

    ​More steps will be required to integrate your SharePoint site and set up your Build servers.

    ​After a TFS upgrade, you'll need to make sure your other servers are still integrated properly.

    1. Check your Build servers. You'll need to upgrade the TFS installation on them and make sure they're set up correctly.
    2. Check your SharePoint servers.  You'll need to install the latest SharePoint Extensions and make sure you repair your SharePoint connections in the Configuration Manager of your TFS Server
      sharepoint_repair.png
  4. Do you know to upgrade your third party tools

    After upgrading, some third-party tools will no longer work.  Check for updates for these tools.
    1. TeamCompanion
      TeamCompanion is compatible with TFS 2012 from version 4.4.
    2. Team Foundation SideKicks
      Version 3.0 is compatible with TFS 2012.
  5. Do you turn off Database Mirroring before Upgrading your TFS databases?

    To avoid headaches while upgrading the TFS database schemas, you should manually turn off database mirroring prior to running the Verify step of your configuration.

    If database mirroring is enabled on your TFS database, an additional step is required to temporarily turn it off when upgrading the database schema. This may require additional permissions that are difficult to check in the Verify step. Verification may hang with no sign of what’s happening until you delve into the SQL Server logs. It’s safer (and avoids problems) if you manually turn it off before you start.​​​

  6. Does your user account have SQL Server System Administrator privileges in SQL Server?

    If you’re upgrading TFS 2010 to 2012, it’s highly recommended that you assign sysadmin privileges to the user account that’s doing the upgrade.

    Some database upgrade steps involve ALTER DATABASE statements and other commands that can’t be done by a normal user. If a step fails, you are likely to end up with a corrupted Configuration database (so you have to restore from backup).​​​