ChangeServerID Command
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.
Note
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.
Required Permissions
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.
Note
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]
Parameters
Placeholder |
Description |
---|---|
ServerName |
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: ServerName\InstanceName |
DatabaseName |
Specifies the name of the configuration database. By default, the name of this database is TFS_ConfigurationDB. |
Option |
Description |
---|---|
/SQLInstance:ServerName |
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: ServerName\InstanceName |
/DatabaseName:DatabaseName |
Required. Specifies the name of the configuration database for Team Foundation Server. |
/ProjectCollectionsOnly |
Specifies that only the GUIDs for collections will be changed. |
/ConfigDBOnly |
Specifies that only the GUID for the configuration database will be changed. |
Remarks
You use the ChangeServerID command to create a discrete duplicate of a deployment of Team Foundation Server for testing or cloning purposes. After you use the ChangeServerID command, you must direct clients to create a connection to the changed server before it can be used.
Example
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.
Note
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
See Also
Tasks
Move a Team Project Collection
Split a Team Project Collection
Concepts
Backing up and Restoring Your Deployment