Sunday 19 May 2013

Specifying TFS 2012 Express Database Location

Over the past few weeks I've been planning the migration of a number of source control repositories to new TFS 2012 repository.

I'm not sure how I'm going to handle the migration of the source files yet but I'll probably just check the existing sources into the new repository since keeping the history is not important.

Installing TFS 2012 Express edition was straight forward but it didn't set thing up as I wanted.

It installed the database into the programs files directory tree on the system drive which I didn't want since the system partition of my server does not have the majority of the free disk space and data should live on the data drive.

The easiest way I found to solve this issue was to install SQL Server Express 2012 before installing TFS 2012 Express. During the install of SQL Server Express 2012 you can easily set the location of the folder where it stores its databases. Once SQL Express 2012 was installed, you install TFS and it finds the instance of SQL Server Express 2012 you just installed and uses it and puts its collection databases in the SQL Server instance's default database directory.