You can use the ChangeServerID command to change the global universal identifications (GUIDs) that are associated with the databases for Visual Studio Team Foundation Server. GUIDs must be unique within a deployment of Team Foundation Server. If more than one database has the same GUID, your deployment can become unstable or unusable. You can change the GUID for the configuration database, the GUIDs for all team project collection databases in the deployment, or both. Although you would not typically use this command in daily operations, you might use this command in the following circumstances:
You restored your deployment to new hardware, the old deployment is still operational, and you want to utilize both deployments. This scenario is sometimes referred to as cloning the server.
You want to test a software update or a hardware configuration on a duplicate deployment so that you do not risk disrupting your production environment.
You want to fully test the restoration of databases to new hardware in a test lab or separate environment, to ensure that your deployment can be restored.
You must reset the GUID for a collection database after moving it to another deployment for which that GUID is already reserved.
The ChangeServerID command is not reversible. After a GUID has been changed, you cannot undo that change except by restoring a previous version of that database.
To use the ChangeServerID command, you must be a member of the Team Foundation Administrators security group and a member of the sysadmin security group for any SQL Server databases that Team Foundation Server uses. For more information, see Team Foundation Server Permissions.
Even if you log on with administrative credentials, you must open an elevated Command Prompt window to perform this function on a server that is running Windows Server 2008. To open an elevated Command Prompt window, click Start, right-click Command Prompt, and then click Run as Administrator. For more information, see this page on the Microsoft Web site: User Account Control.
TFSConfig ChangeServerID /SQLInstance:ServerName] /DatabaseName:ConfigurationDatabaseName [/ProjectCollectionsOnly] [/ConfigDBOnly]
Specifies the name of the server that hosts the configuration database for Team Foundation Server and the name of the instance if you want to use an instance other than the default instance. If you specify an instance, you must use the following format:
Specifies the name of the configuration database. By default, the name of this database is TFS_ConfigurationDB.
Required. Specifies the name of the server that is running SQL Server and the name of the instance if you want to use an instance other than the default instance. If you specify an instance, you must use the following format:
Required. Specifies the name of the configuration database for Team Foundation Server.
Specifies that only the GUIDs for collections will be changed.
Specifies that only the GUID for the configuration database will be changed.
The following example shows how to change the GUIDs of all databases in the Contoso1 deployment of Team Foundation Server, where the configuration database is hosted on the server that is named "ContosoMain" on the named instance "TeamDatabases" in SQL Server.
The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious. No association with any real company, organization, product, domain name, email address, logo, person, places, or events is intended or should be inferred.
TFSConfig ChangeServerID /SQLInstance:ContosoMain\TeamDatabases /DatabaseName:TFS_ConfigurationDB