How to: Move from a Single-Server to a Dual-Server Deployment

In order to support a larger number of projects or improve Team Foundation Server performance, you might want to move from a single-server to a dual-server deployment of Team Foundation Server. In this kind of move, the original Team Foundation Server installation is converted into the Team Foundation application-tier server, and a new installation of Team Foundation Server is configured as the Team Foundation data-tier server. The data from your original Team Foundation Server deployment is restored to the new environment. In order to successfully perform this kind of move, you must not:

  • Change the service accounts during the move.

  • Change the name of the Team Foundation Server when you convert it to act as the Team Foundation application-tier server during the move.

  • Change the domain of the Team Foundation Server during the move.

  • Install the Team Foundation data-tier server in a different domain than the original Team Foundation Server deployment without sufficient trusts.

Before you move your Team Foundation Server deployment, you need to prepare for the move. You must complete many steps when you move from a single-server to a dual-server deployment. This topic provides links to some of these steps. Read through and consider whether you want to print all the required steps before you start the move. To move from a single-server to a dual-server deployment, you must perform steps such as installing new instances of Team Foundation Server, backing up and restoring data, re-creating or migrating user accounts and service accounts, and reconfiguring your servers.

Required Permissions

To complete these procedures, you must be a member of the Administrators group on the old and new servers and a member of the Team Foundation Administrators group.

To prepare the single-server Team Foundation Server deployment to move to a dual-server deployment

  1. Back up all the Team Foundation Server databases.

    For more information about how to back up Team Foundation Server, see How to: Back Up a Team Foundation Server.

    Note

    If you have created any Windows SharePoint Services custom site definitions, custom site templates, or custom Web parts and you want to keep your customizations, you must back them up also. For more information, see the Microsoft Web site (https://go.microsoft.com/fwlink/?LinkId=63543).

  2. Back up the Reporting Services encryption key. Make sure that you store the encryption key in a secure location on a different computer that can be accessed in the domain.

    For more information about how to back up the encryption key, see How to: Back Up the Reporting Services Encryption Key.

To uninstall Team Foundation Server components

  • Uninstall Team Foundation Server components from the single-server Team Foundation Server. For more information, see How to: Uninstall Team Foundation Server Single-Server Deployment in the Team Foundation Installation Guide. The most current version of the Team Foundation Installation Guide is available on the Web at the MSDN Online site (https://go.microsoft.com/fwlink/?linkid=40042).

To install Team Foundation Server in a dual-server deployment

  • Install a dual-server Team Foundation Server deployment. Make sure that you install the Team Foundation application-tier server on the server that used to be the Team Foundation Server single-server deployment. For more information, see Overview of Team Foundation Server Dual-Server Deployment in the Team Foundation Installation Guide. The most current version of the Team Foundation Installation Guide is available on the Web at the MSDN Online site (https://go.microsoft.com/fwlink/?linkid=40042).

To save Reporting Service installation IDs and stop services

  1. On the new Team Foundation application-tier, retrieve and save a list of the Reporting Service installation IDs.

    1. Open the Command Prompt window and change directories to drive:\%ProgramFiles%\Microsoft SQL Server\90\Tools\binn\

    2. Run RSKeyMgmt -l.

    3. Note the installation IDs and print a list or save the list in a safe location.

  2. Click Start, click Administrative Tools, click Services, select the TFSServerScheduler service, and then click Stop, if not already stopped.

  3. Select the SharePoint Timer Service and then click Stop.

    Important

    To move user accounts and service accounts when moving from a single-server to a dual-server deployment, Team Foundation Server must be in a stopped state. Restarting Team Foundation Server after you restore data but before you move user accounts and service accounts could cause users targeted for migration to be marked as deleted in the TFSIntegration database when the group security service cannot find the user’s SID during synchronization with Active Directory.

  4. Click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.

  5. In the Explorer pane, expand the Application Pools node, right-click TFS App Pool, and then click Stop.

  6. In the Explorer pane, under the Application Pools node, right-click Report Server, and then click Stop.

  7. Click Start, click Programs, click Microsoft SQL Server 2005, click Configuration Tools, and then click Reporting Services Configuration.

  8. In Report Server Installation Instance Selection, make sure that the computer name is the name of the Team Foundation application-tier server and that the instance name is MSSQLSERVER, and then click Connect.

  9. In the Explorer pane, click Server Status. In the Report Server Status pane, in Instance Properties, click Stop.

Restore the Databases

After you stop the services, you can restore the Team Foundation Server data using the restore tools provided with SQL Server 2005.

Warning

You must restore all the databases to backups at the same time. Otherwise, the databases might become corrupted.

To open the Restore Database dialog box

  1. On the Team Foundation data-tier server, click Start, click All Programs, click Microsoft SQL Server, and then click SQL Server Management Studio.

    Note

    For more information about how to restore databases, see Implementing Restore Scenarios for SQL Server Databases.

  2. Select Database Engine for the Server type.

  3. Select the appropriate Server name and Authentication scheme for the server, provide a valid User name and Password if it is required by your SQL Server, and then click Connect.

  4. Expand the Databases node to show the list of databases that make up the Team Foundation Server data tier.

Complete the "To restore each database" procedure for each of the following databases:

  • ReportServer

  • ReportServerTempDB

  • STS_Content_TFS

  • TfsBuild

  • TfsIntegration

  • TfsVersionControl

  • TfsWarehouse

  • TfsWorkItemTracking

  • TfsWorkItemTrackingAttachments

  • TfsActivityLogging (optional)

Important

Do not restore the SharePoint Configuration Database (STS_Config_TFS) for restoration-based moves.

Note

You must upload any new custom site templates or Web parts created for custom process templates to SharePoint databases as part of the restore process.

To restore each database

  1. Right-click the database you want to restore, point to Tasks, point to Restore, and then click Database.

  2. In the Restore Database dialog box, select From Device in the Source for restore area, and then click the ellipsis button ().

  3. In the Specify Backup dialog box, fill out the information to specify the location of the backup file, and then click OK.

    The first backup you apply must be a full backup, followed by the transaction log backups, in the order they were created.

  4. In the Select the backup sets to restore area, select the backup sets to restore.

  5. From the left navigation pane, select Options, and then select the Overwrite the existing database box.

  6. Verify that the paths specified in the Restore the database files as area match your current database paths.

    This is important if you are restoring the database to a different drive.

  7. Select the appropriate state from the Recovery state area.

  8. Perform one of the following steps:

    If you are not applying additional transaction logs, select Leave the database ready to use.

    - or -

    If you are applying additional transaction logs, select Leave the database non-operational.

  9. Click OK to dismiss the Restore Database dialog box and restore the database.

  10. If you are applying additional transaction logs, follow this procedure for each log backup in the order they were created, starting from the one made after the full backup.

    For more information, see Applying Transaction Log Backups.

Rename the Team Foundation Data-Tier Server and Activate the Team Foundation Application-Tier Server

After restoring the Team Foundation Server databases, you must configure the Web.Config file with the name of the original Team Foundation data-tier server before you can use the TfsAdminUtil command-line tool to rename the data tier.

To modify the Web.Config file to reflect the original Team Foundation data-tier server name

  1. Modify the services web.config file and replace the Team Foundation data-tier name with the old Team Foundation data-tier name as follows:

    1. On the new Team Foundation data-tier server, open a Command Prompt window and change directories to drive:\%ProgramFiles%\Microsoft Visual Studio 2005 Team Foundation Server\Web Services\Services.

    2. Open the web.config file in this directory in Notepad or any text-based editor.

    3. In the connection string value, under the appSettings node, change the Source parameter to use the original Team Foundation data-tier server name. For example, the following line must be modified from:

      Application Name=TeamFoundation;Data Source=newTeamFoundationDataTierServerName;Initial Catalog=TfsIntegration;Integrated Security=True;Persist Security Info=False

      To

      Application Name=TeamFoundation;Data Source=oldTeamFoundationDataTierServerName;Initial Catalog=TfsIntegration;Integrated Security=True;Persist Security Info=False

    4. Save the Web.config file and close Notepad.

    Note

    The TfsAdminUtil RenameDT expects that the connection string in the services Web.config file refers to the old Team Foundation data tier server name. The server name must be restored to the web.config file for the command-line tool to run correctly.

  2. From the Command Prompt window, change directories to drive:\%ProgramFiles%\Microsoft Visual Studio 2005 Team Foundation Server\Tools and type the following command:

    TfsAdminUtil RenameDT newTeamFoundationDataTierServerName

  3. If the new Team Foundation application-tier server has a different name than the original Team Foundation application-tier server, you must update the TFSIntegration database with the new Team Foundation application-tier server name, and then rename the application-tier service interface registration entries to point to the new Team Foundation application-tier server.

    Note

    This step is required only if the new Team Foundation application-tier server has a different name from the original Team Foundation application-tier server.

    1. On the new Team Foundation application-tier server, open a Command Prompt window.

    2. Change directories to drive:\%ProgramFiles%\Microsoft Visual Studio 2005 Team Foundation Server\Tools.

    3. At the command prompt, type the following command:

      TfsAdminUtil ActivateAT newTeamFoundationApplicationTierServerName

Restore Team Project Web Sites

You must restore any team projects Web sites to the new Team Foundation application-tier server.

To restore Windows SharePoint Services project sites on the new Team Foundation application-tier server

  1. Click Start, click Administrative Tools, and then click SharePoint Central Administration.

  2. On the Central Administration page, click Configure virtual server settings.

  3. On the Virtual Server List page, click Default Web Site.

  4. On the Virtual Server Settings page, click Manage content databases.

  5. On the Manage Content Databases page, click STS_Content_TFS.

  6. On the Manage Content Database Settings page, select Remove content database, and then click OK.

  7. On the Manage Content Databases page, click Add a content database.

  8. On the Add Content Database page, in Database Information, click Specify database server settings and in Database name, type STS_CONTENT_TFS. In Database Capacity Settings, in Number of sites before a warning event is generated, type 9000, and in Maximum number of sites that can be created in this database, type 15000, and then click OK.

  9. (Optional) If you backed up any Windows SharePoint Services custom site definitions, custom site templates, or custom Web parts and you want to keep your customizations, restore these components now. For more information, see the Microsoft Web site (https://go.microsoft.com/fwlink/?LinkId=63543).

  10. Click Start, click Administrative Tools, click Services, select the SharePoint Timer Service, and then click Start.

Restore and Test SQL Report Server, Reporting Services, and Default Reports

After restoring project Web sites, you must restore reporting services to the new Team Foundation application-tier server.

To restore and verify Report Server on the new Team Foundation Server

  1. On the Team Foundation application-tier server, click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.

  2. In the Explorer pane, under the Application Pools node, right-click Report Server, and then click Start.

  3. Click Start, click Programs, click Microsoft SQL Server 2005, click Configuration Tools, and then click Reporting Services Configuration.

  4. In Report Server Installation Instance Selection, make sure that the computer name is the name of the new Team Foundation application-tier server and that the instance name is MSSQLSERVER, and then click Connect.

  5. In the Explorer pane, click Server Status. In the Report Server Status pane, in Instance Properties, click Start.

  6. In the Explorer pane, click Database Setup. In the Database Connection pane, make sure that the name of the Team Foundation data-tier server is correct in Server Name, and then click Connect.

  7. On the SQL Server Connection Dialog dialog box, click OK.

  8. In the Database Connection pane, click Apply.

  9. On the SQL Server Connection Dialog dialog box, click OK.

  10. In the Explorer pane, click Windows Service Identity. On the Windows Service Identity page, in the Built-in Service Account box, Network Service should be selected, but Apply is unavailable. To grant the Team Foundation application-tier server log on permissions to the SQL Server on the Team Foundation data-tier, in the Built-in Service box, select Local Service. Do not click Apply, but instead return to the Built-in Service drop-down box and re-select Network Service. When Network Service is selected and Apply is available, click Apply. In the SQL Server Connection Dialog dialog box, click OK.

  11. Restore the encryption key and remove previous instances of Report Server by doing one of the following:

    If you are running SQL Report Server Enterprise Edition

    1. In the Explorer pane of Reporting Services Configuration, click Encryption Keys.

    2. In the Explorer pane, click Encryptions Keys. On the Encryption Key page, click Restore.

    3. On the Encryption Key Information page, type the password for the encryption key file in Password, type or select the backup encryption key .snk file location in Key File, and then click OK.

    4. In the Explorer pane of Reporting Services Configuration, click Initialization. On the Initialization page, select the instance ID that corresponds with the name of the old Team Foundation data-tier server. Click Remove, and then click OK.

      Note

      Do not remove the installation ID that you recorded in the "To save Reporting Service installation IDs and stop services" section of this document.

    If you are running SQL Report Server Standard Edition

    1. Close the Reporting Services Configuration tool.

    2. Click Start, click Run, type cmd, and then click OK to open a Command Prompt window.

    3. Change directories to drive:\%PROGRAMFILES%\Microsoft SQL Server\90\Tools\binn.

    4. Type the following command to view a list of Reporting Service instances:

      RSKeyMgmt -l

    5. Review the list to find the name of the Reporting Service instance that corresponds with the name of the Team Foundation data-tier server. Type the following command to remove that instance, where DTInstanceID is the name of the instance that corresponds with the name of the old Team Foundation data-tier server:

      RSKeyMgmt –r DTInstanceID

      Note

      Do not remove the installation ID that you recorded in the "To save Reporting Service installation IDs and stop services" section of this document.

    6. On the Team Foundation application-tier server, click Start, click All Programs, click Microsoft SQL Server, click Configuration Tools, and then click Reporting Services Configuration.

    7. In the Explorer pane, click Encryptions Keys. On the Encryption Key page, click Restore.

    8. On the Encryption Key Information page, type the password for the encryption key file in Password, type or select the backup encryption key .snk file location in Key File, and then click OK.

  12. Connect to https://localhost/reports. In Contents, click TfsReportDS.

  13. In Connection string, update the Data source parameter with the Team Foundation data-tier server name. In Connect using, select Credentials stored securely in the report. Update the user name and password to reflect the new reporting services service account, and then click Apply.

  14. Under SQL Server Reporting Services, click Home.

  15. In Contents, click TfsOlapReportsDS.

  16. In Connection string, update the Data source parameter with the Team Foundation data-tier server name. In Connect using, select Credentials stored securely in the report. Update the user name and password to reflect the new reporting services service account, and then click Apply.

  17. Open a Command Prompt window and change directories to drive:\%ProgramFiles%\ Microsoft Visual Studio 2005 Team Foundation Server\Tools. Type the following command, where newDataTierServerName is the name of your new Team Foundation data-tier server, newTeamFoundationDataWarehouseName is the name of the data warehouse, TFSReportServiceAccount is the name of the reporting services service account, and TFSServiceAccount is the name of the Team Foundation Server service account:

    SetupWarehouse.exe -o -s newDataTierServerName -d newTeamFoundationDataWarehouseName -c warehouseschema.xml -ra TFSReportServiceAccount -a TFSServiceAccount

  18. On the Team Foundation data-tier server, click Start, click Programs, click Microsoft SQL Server 2005, and then click SQL Server Management Studio.

  19. On the Connect to Server dialog box, in Server type, select Database Engine. Make sure that the server name and authentication values are correct, and then click Connect.

  20. In the Object Explorer pane, expand Databases, expand TFSWarehouse, right-click dbo._WarehouseConfig, and then click Properties.

  21. In Table Properties - _WarehouseConfig, in Select a page, click Permissions.

  22. In Users or Roles, click Add.

  23. In Select Users or Roles, add the Reporting Services service account (referred to generically as TFSReports), and then click OK.

  24. In Table Properties - _WarehouseConfig, click OK.

  25. In the Object Explorer pane, click Connect, and then select Analysis Services.

  26. On the Connect to Server dialog box, make sure that the server name and authentication values are correct, and then click Connect.

  27. In the Object Explorer pane, expand Databases, right-click TFSWarehouse, and then click Process.

  28. In Process Database - TFSWarehouse, click OK.

  29. On the Team Foundation application-tier server, connect to https://localhost/reports. In Contents, click any project. Click any one of the default reports in the project and verify that the report appears correctly.

To restart services and verify operation

  1. On the new Team Foundation application-tier server, click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.

  2. In the Explorer pane, expand the Application Pools node, right-click TFS App Pool, and then click Start.

  3. On the new Team Foundation application-tier server, click Start, click Administrative Tools, click Services, select the TFSServerScheduler service, and then click Start, if not already started. Select the SharePoint Timer Service and then click Start.

  4. On the Team Foundation data-tier server, connect to https://localhost:8080/WorkItemTracking/v1.0/ClientService.asmx.

    1. In ClientService, click StampWorkitemCache.

    2. In StampWorkitemCache, click Invoke.

See Also

Tasks

How to: Move Your Team Foundation Server from One Environment to Another
How to: Move Your Team Foundation Server from One Hardware Configuration to Another

Concepts

Team Foundation Server Move Types
Application-Tier Server Requirements for Team Foundation
Data-Tier Server Requirements for Team Foundation
Managing Team Foundation Server in a Workgroup

Other Resources

Managing Team Foundation Server in an Active Directory Domain