Tech Blog, Tips and Tricks

Upgrading Team Foundation Server, TFS 2010 to TFS 2017

strongitguy_TFSupgrade

Upgrading TFS 2010 to TFS 2017 and SQL Server 2008 to SQL Server 2016

The Problem

We need to upgrade a physical server, we will call it “Tcode”.  Tcode has Server 2008 32bit installed with TFS 2010 and SQL Server 2008.  Since our machine is a production machine, I need to do this gracefully.

With so many different “ways” to do this upgrade, I found this step to be the easiest.

We are going to go from TFS 2010/SQL 2008 -> TFS 2015/SQL 2014 then -> TFS 2017/SQL 2016

Testing and Implementation

I tested this with VM’s first, but the same process works on physical hardware.

Step 1: I used a backed up image of Servername:”Tcode”, and restored it as a virtual machine using Virtual Box.  Once Installed, I renamed the machine and tested connectivity with Visual Studio.  Test Passed.  Be careful renaming the machine if you plan to allow it access to the domain.

Step 2: Under SQL Server Management Studio, I detached the database files Servername:”Tcode” -> right click -> Database file -> Tasks -> Detach

Pull the database files from:

C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA

There are permission issues with reattaching the database files.  I just place them in a folder on the C drive and go from there.

Step 3: TFS 2015 Requires a newer OS than Server 2008, so we are going to start with a fresh install of Server 2016.  Fired up 2016, installed SQL Server 2014, opened required ports, and attached the database files pulled in Step 2.  They should attach and come online without issue.  Now install TFS 2015 as an upgrade.  Test with Visual Studio, if all works, YAY!

Step 4: Upgrade to SQL Server 2016 as an upgrade.  You will also need to install SQL Server Management Studio 17.3 separately, as it does not come bundled with SQL Server 2016.  Then update TFS to 2017 as an upgrade.  Test and you should be good to go.

Overview of steps:

  1. Backup TFS Server
  2. Detach Database for TFS, transfer to backup disk
  3. Power off physical machine.
  4. Setup Backup of TFS Server VM and rename if keeping the same hostname
  5. Install Server 2016 on Physical Server/VM. Rename/join domain, etc
  6. Install SQL 2014
  7. Attach Databases from Backup disk
  8. Install TFS 2015 “Upgrade”
  9. Upgrade SQL 2014 to 2016, you will need SQL SP1 before you can upgrade to TFS 2017
  10. Upgrade TFS 2015 to TFS 2017

Leave a Reply

Your email address will not be published.