Export (0) Print
Expand All

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.

    NoteNote

    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.

NoteNote

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]

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.

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.

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.

NoteNote

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

Community Additions

ADD
Show:
© 2014 Microsoft