0
votes

Everything worked fine until I attempted to attach the old tfs_default_collection database (restored to SQL Server 2012 Developer as the new database tfs_collection_2012), when I get the error below:

enter image description here

As per the very first instruction of the TFS 2013 Setup process, I fully uninstalled TFS 2012 Express several hours ago when I bean the migration. Is there any way to properly detach this Collection with TFS-2013 now properly installed and otherwise working, so that it can be attached to TFS-2013 for migration/update?

I have checked all the privileges (in TFS and SQL Server) and believe those to be properly setup, though I am by no means a TFS Administrator.

I still have the SQL Server backups of both Tfs_Configuration and Tfs_DefaultCollection from the old instance of SQL Server 2012 Express and TFS-2012 Express.

2

2 Answers

1
votes

TFS associates a server with its databases by stamping them with an ID derived from the server instance. When you move the database to a different server or possibly between different TFS versions/editions you may need to update this ID, as it will give your error message if it thinks the database does not match the server.

It's a while ago so the details are a bit fuzzy, but I came across a problem with the same symptoms when I had to rebuild a TFS server. The hardware, OS version and server name/IP were "identical" but the server's ID changed, so it refused to attach to the database. Gave me quite a stressful morning until I discovered the server ID!

It may be this that you need to sort out. More information on changing server IDs on your database can be found here - I hope this gives you a good lead to follow. I suggest you do a bit of web research on this so you understand what you'll need to do before you attempt to put anything into action. (I can't give explicit instructions as it's over a year since I did this myself)

(But as you have a backup of the databases you should be able to give this a try and roll everything back if it doesn't help)

0
votes

If you have TFS 2012 installed and uninstall, then install TFS 2013 as per the documentation then everything works. You are running into an issue as you did not upgrade you existing TFS instance but took a part of it only. This will not work. At this point you have two options:

  1. Restore both your collection and configuration backup and reinstall TFS 2012. You can then follow the documentated procedure to detach the collection from your TFS instance prior to moving it to your other existing instance. An unattached 2012 collection will be upgraded by your TFS 2013 instance.
  2. Restore both your collection and configuration databases and follow the documentation for an in place upgrade. Here you just run the TFS 2013 installation on your server with 2012 and it will do the work of uninstalling and upgrading the entire instance.

There is a tight relationship between the Collection and Configuration databases. When you detach a collection TFS packages the appropriate configuration bits and saves it to the Collection for transport to another system.