3
votes

I do not see an option to change the SQL instance in the Team Foundation Server Administration Console so I am assuming it is necessary to do so using TFSConfig. I am a little confused by the documentation as it states TFSConfig.exe /SQLInstance should only be used with /ResetOwner. I am not resetting the owner. If my old server instance is "Tfs" and my new instance is "TFS-SQL1\Tfs" how do I configure this in TFS?

1

1 Answers

5
votes

If you are moving all the databases to a new instance or server, you can use the RegisterDb command.

"Use RegisterDB to update name of the server that hosts the configuration database in Visual Studio Team Foundation Server (TFS)."

In your case it would be something like this: TFSConfig RegisterDB /SQLInstance:TFS-SQL1\Tfs /databaseName:Tfs_Configuration

The other option is the RemapDBs command.

"The RemapDBs command redirects Visual Studio Team Foundation Server (TFS) to its databases when they are stored on more than one server and you are restoring, moving, or otherwise changing the configuration of your deployment TFSConfig RemapDBs /DatabaseName:TFS;TFS_Configuration /SQLInstances:TFS-SQL1\Tfs

Personally I have found that a more fail safe way of doing it is to simple reconfigure TFS.

If you run

TfsConfig setup /uninstall:ApplicationTier

from the command line, it will set TFS application tier into a "un-configured" state which allows you to run through the setup / configuration wizard. Simply re-configure as an Application Tier and point it to the new server instance.