Move a Team Project Collection

You can move a database for a team project collection from one server that is running SQL Server to another. You can also move a team project collection from one deployment of Visual Studio Team Foundation Server 2010 to another. 

Note

When you move a collection, you should make sure that the edition of SQL Server to which you are moving the database matches the edition that originally hosted that database. For example, if the collection database is hosted on a server that is running SQL Server Enterprise Edition, you should move it to a server that is also running SQL Server Enterprise Edition. You should not move it to a server that is running SQL Server Standard Edition or SQL Server Express. If you must change editions, you must perform additional steps to successfully move the database.

You might want to move a team project collection in the following circumstances:

  • You want to expand your deployment of Team Foundation Server by adding another instance of SQL Server to it, and you want to distribute existing collections between the instances.

  • You have more than one deployment of Team Foundation Server in your organization, and you want to move a collection to another deployment to better align with your business needs.

  • You want to move the collection to a remote office that has its own deployment of Team Foundation Server.

The steps that you must perform to move a collection will depend on the particular configuration of the deployment that hosted the collection and the deployment to which you move it. For example, if you move a collection to a deployment of Team Foundation Server that uses a different SharePoint Web application, either you will also need to move the site collection database that supports the collection to that SharePoint Web application and manually reconnect the team project collection to the site collection after it has been moved, or you must add the SharePoint Web application that supports the collection to the deployment of Team Foundation Server to which you have moved it. Similarly, if you move a collection to a new domain, you will need to add users from that domain to the appropriate groups at the collection level and the project level.

Note

The procedures in this topic describe how to move an entire team project collection. If you want to move part of a collection, see Split a Team Project Collection.

In this topic

To move a team project collection, you must complete the following procedures in the sequence listed:

  1. Required Permissions

  2. Save Reports

  3. Delete Lab Management Resources

  4. Unmap the Collection from Microsoft Project Server

  5. Detach the Collection

  6. Rebuild the Data Warehouse and Analysis Services

  7. Back Up the Collection Database

  8. Prepare to Move the Site Collection Database

  9. Prepare SQL Server

  10. Move the Site Collection Database

  11. Restore the Collection Database

  12. Attach the Collection

  13. Move Reports

  14. Reconnect Resources for the SharePoint Web Application

  15. Configure the Moved Team Project Collection

  16. Configure Lab Management Resources

  17. Configure Project Server Integration

  18. Configure Projects

Required Permissions

To perform the following procedures, you must be a member of the following groups:

  • a member of the Administrators security group on the server or servers that are running the administration console for Team Foundation

  • a member of the sysadmin group in SQL Server on the servers and instances that host databases for Team Foundation Server

  • a member of the Farm Administrators group for the farm to which you are configuring a Web application and changing settings for the collection, if your deployment uses SharePoint Products.

If you are moving the collection between deployments that use SharePoint Products, it is strongly recommended that the service account for Team Foundation Server be a member of the Farm Administrators group in SharePoint Products in both deployments. Otherwise, you might experience errors when you attempt to detach or attach the collection.

Note

You can move a team project collection without granting this membership to the service account for Team Foundation Server. However, errors will appear when you attach the collection, and you will need to perform additional steps to reconnect projects with their portals. Even if your operational requirements generally restrict granting this membership to the service account, you should consider adding the service account to the Farm Administrators group for the duration of the move operation.

In addition to these memberships, you might need to address the following requirements on a computer that is running Windows Server 2008:

  • To follow a command-line procedure, you might need to open an elevated Command Prompt by clicking Start, right-clicking Command Prompt, and clicking Run as Administrator.

  • To follow a procedure that requires Internet Explorer, you might need to start it as an administrator by clicking Start, clicking All Programs, right-clicking Internet Explorer, and then clicking Run as administrator.

  • To access SharePoint Central Administration, Report Manager, reports, or Web sites for SQL Server Reporting Services, you might need to add these sites to the list of trusted sites in Internet Explorer.

For more information, see the following topic on the Microsoft Web site: User Account Control.

Save Reports

You can skip this procedure if you are not using a server that is running Reporting Services as part of your deployment, or if the deployment to which you are moving the collection does not use a report server.

If the deployment from which you are moving the collection uses a report server, you must save the reports used by the collection so that you can upload them to the report server that supports the deployment to which you are moving the collection.

To save reports

  • For information about this task, see the "Exporting and Saving Reports" section in the following topic on the Microsoft Web site: Saving Reports.

Delete Lab Management Resources

You can skip this procedure if either of the following conditions is true:

  • The team project collection that you are moving is not currently configured for Visual Studio Lab Management. 

  • You are moving the team project collection within the same domain and intend to use the same System Center Virtual Machine Manager (SCVMM) that previously supported the collection.

If you are moving the collection to a different domain or intend to use a different System Center Virtual Machine Manager, you must delete the resources that are used by Lab Management from the collection database. These resources include virtual machines, templates, team project host groups, and team project library shares. You will need to re-create the Lab Management assets after you restore and attach the collection.

To delete the Lab Management resources

  • For information about how to remove all group hosts, library shares, and environments from a specified team project collection, see TFSConfig Lab /Delete Command with the /External option.

Unmap the Collection From Microsoft Project Server

You can skip this procedure if your deployment of Team Foundation Server is not integrated with Microsoft Project Server. For more information, see Microsoft Team Foundation Server 2010 and Microsoft Project Server Integration Feature Pack.

Before you move a collection, you must unmap any collections that will not continue to synchronize with the instance of Project Web Access or Project Web App (PWA) that supports the deployment of Team Foundation Server. Each instance of PWA can integrate with only one deployment of Team Foundation Server. Collections on different deployments of Team Foundation Server cannot synchronize with the same instance of PWA.

For example, you must determine which of the following scenarios best supports your business needs if you have two collections on your deployment of Team Foundation Server and they are both integrated with Project Server:

  • If you intend to move both collections and continue to use the same instance of PWA, you do not need to unmap the collections. However, you must re-register them after the move by following the steps in Configure Project Server Integration.

  • If you intend to move only one collection, you must first unmap one of the collections. Which collection you unmap depends on how you want to support Project Server integration with your Team Foundation Server deployments.

    • You must unmap a collection if you do not intend to continue integration of it or if you are moving it to a deployment of Team Foundation Server that is integrated with a different instance of PWA.

    • If you intend to continue integration with the same instance of PWA, you must unmap the other collection or collections that are integrated with that instance before you move the collection.

To unmap a collection

Detach the Collection

Before you move a collection, you must first detach it from the deployment of Team Foundation Server on which it is running. When you detach a collection, all jobs and services are stopped, and then the collection database is stopped. 

Note

Detaching a collection prevents users from accessing any projects in that collection but does not delete any data. To delete the data for the collection, you must delete the collection.

To detach a team project collection

  1. Open the administration console for Team Foundation on the server that hosts the collection that you want to move.

    For more information, see Open the Team Foundation Administration Console.

  2. Click Team Project Collections, and in the list of collections, click the collection that you want to move.

  3. On the General tab, click Detach Team Project Collection.

    The Detach Team Project Collection Wizard opens.

  4. (Optional) On the Provide a servicing message for the team project collection page, in Servicing Message, type a message for users who might try to connect to projects in this collection.

  5. Click Next.

  6. On the Review settings that will be used to detach team project collection page, review the details.

  7. If you want to changes any settings, click Previous. If they appear to be correct, click Verify.

  8. When all the readiness checks have completed successfully, click Detach.

  9. On the Monitor the team project collection detach progress page, when all processes have completed, click Next.

  10. (Optional) On the Review supplemental information for this team project collection page, click or note the location of the log file.

  11. Click Close.

    The team project collection no longer appears in the list of collections in the administration console.

Rebuild the Data Warehouse and Analysis Services

You can skip this procedure if you are not using a server that is running Reporting Services as part of your deployment.

If the deployment from which you are moving the collection uses a report server, you must rebuild the warehouse for Team Foundation and the database for Analysis Services. You must perform this step on the server from which you removed the collection to ensure that reports and dashboards work correctly for the deployment after you remove the collection.

To rebuild the data warehouse and the Analysis Services database

  1. Open the administration console for Team Foundation.

  2. In the navigation bar, click Reporting.

  3. In Reporting, click Start Rebuild.

  4. In the Rebuild the Warehouse and Analysis Services Databases dialog box, click OK.

    Note

    The warehouses will finish rebuilding and the data will finish repopulating after the Start Rebuild action completes. Depending on the size of your deployment and the amount of data, the entire process might take several hours to complete.

Back Up the Collection Database

After you have detached the collection, you must back up its database to move it to the other server. To perform this task, you must use the tools that are provided with SQL Server.

Note

If you are moving a collection database to a server that is running a different edition of SQL Server, you must disable SQL Server compression on that database. For more information, see the Microsoft Web site.

To back up a collection database

Prepare to Move the Site Collection Database

You can skip this procedure if any condition in the following list is true:

  • You are moving the collection to a deployment of Team Foundation Server that utilizes the same SharePoint Products resources as the original deployment.

  • You plan to add the SharePoint Web application that supports the collection to the deployment of Team Foundation Server to which you are moving the collection.

  • The collection you are moving does not use SharePoint Products.

To move a team project collection that uses a SharePoint Web application, you must move the site collection that supports the team project collection to the Web application that will support the collection in the deployment to which you are going to move it.

To prepare to move the site collection database

Prepare SQL Server

If you are moving the collection database to a server or instance that is already hosting one or more databases for Team Foundation Server, skip this procedure.

You must prepare SQL Server to host Team Foundation Server databases by using the TFSConfig PrepSQL command-line utility. This command creates the permissions groups in SQL Server that Team Foundation Server requires (TFSExecRole and TFSAdminRole) and populates those groups with the account that was used to run this command. 

To prepare SQL Server to host databases for Team Foundation Server

  1. Log on to the application-tier server for Team Foundation to which you want to move the collection, open a Command Prompt window, and change directories to Drive:\%programfiles%\Microsoft Team Foundation Server 2010\Tools.

  2. Type the following command, where ServerName is the name of the instance of SQL Server that will host the collection database for Team Foundation Server:

    **TFSConfig PrepSQL /SQLInstance:**ServerName

    You can specify ServerName in either ServerName or ServerName\InstanceName format. You must specify the instance name if you are not using the default instance. For more information, see PrepSQL Command.

Move the Site Collection Database

You can skip this procedure if you did not perform the steps to prepare to move the site collection database, as described earlier in this topic.

If you backed up the site collection database for the team project collection that you are moving, you must restore it to the SharePoint Web application that supports the deployment of Team Foundation Server to which you are moving the collection.

To move the site collection database

Restore the Collection Database

As part of moving the collection, you must restore the collection database to an instance of SQL Server that is configured to support the deployment of Team Foundation Server to which you want to move the collection.

To restore the collection database

Attach the Collection

After you restore the collection database, you can attach the collection to the deployment of Team Foundation Server to which you want to move it.

Note

Warnings will appear when you attach the collection if your deployment uses SharePoint Products and the service account for Team Foundation Server is not a member of the Farm Administrators group. This behavior is expected.

To attach the collection

  1. Open the administration console for Team Foundation on the server that hosts the application tier for the deployment to which you want to move the collection.

  2. Click Team Project Collections, and then click Attach Team Project Collection.

    The Attach Team Project Collection Wizard opens.

  3. On the Select the team project collection database to attach page, in SQL Server Instance, type the name of the server and the instance that hosts the collection database, if it is not already listed.

  4. In the Databases list, click the collection database that you want to attach, and then click Next.

  5. On the Enter the team project collection information page, type a name for the collection in Name if one is not already present.

  6. (Optional) In Description, type a description of the collection.

  7. Click Next.

  8. On the Review settings that will be used to attach the team project collection page, review the information.

  9. If you must change any settings, click Previous. If all the settings are correct, click Verify.

  10. When all the readiness checks have completed successfully, click Attach.

  11. On the Monitor the team project collection attach progress page, when all processes have completed, click Next.

  12. (Optional) On the Review supplemental information for this team project collection page, click or note the location of the log file.

  13. Click Close.

    The team project collection appears in the list of collections in the administration console. The SharePoint Web application that supported this collection in its original deployment will appear in the list of Web applications.

  14. (Optional) Modify or remove the Web application from the list of Web applications. For more information, see Modify or Remove Access Between a SharePoint Web Application and Team Foundation Server.

Move Reports

You can skip this procedure if you are not using a report server as part of your deployment or if the deployment of Team Foundation Server to which you are moving the collection uses the same report server.

You must move the reports that this collection uses to the report server for the deployment of Team Foundation Server to which you have moved the collection. You must upload each report manually, which can be a lengthy process. Consider whether you want to upload all reports or whether a subset of reports will meet your business needs. You do not have to upload all reports or any reports, but only those reports that you upload will be available after the move process is completed.

To move reports

  1. Upload each report that you want to move to the appropriate folder in Report Manager.

    For more information, see the following topic on the Microsoft Web site: Uploading Files to a Folder.

  2. In Report Manager, edit each report to change the data source to the new report server.

    For more information, see the following topic on the Microsoft Web site: How to: Configure Data Source Properties for a Report.

  3. After you have uploaded and edited each report, reconnect the SharePoint Web application that supports the portals for the team projects that use the reports.

    For more information, see the next procedure.

Reconnect Resources for the SharePoint Web Application

If you are moving the collection to a deployment of Team Foundation Server that does not use SharePoint Products or a report server, skip the following procedure.

You must repair the connection to the SharePoint Web application even if you move the collection to a deployment of Team Foundation Server that uses the same SharePoint Web application as the deployment of Team Foundation Server from which you moved the collection. You must perform this procedure to ensure that all connections are correctly set between the restored collection and the Web application.

To repair the connection to a SharePoint Web application

  1. Open the administration console for Team Foundation on the server that hosts the application tier for the deployment to which you want to move the collection.

  2. Click SharePoint Web Applications, and in the list of Web applications, click the Web application that supports the collection that you just attached.

    The Repair Connection button appears after you select a Web application in the list.

  3. Click Repair Connection, and in the Repair the connection to a SharePoint Web Application dialog box, click Reconnect.

  4. When the Status window reports Reconnect operation succeeded, click Close.

Configure the Moved Team Project Collection

You can skip this procedure if you moved the collection in the same domain, intend to use the same Web application that previously supported the collection, and you want to allow access for the administrators of that collection to this deployment of Team Foundation Server.

After you have moved a collection, you must update the Web application and permission groups for that collection with the appropriate settings.

To configure the moved collection

Configure Lab Management Resources

You can skip this procedure if you moved the team project collection in the same domain and intend to use the same System Center Virtual Machine Manager (SCVMM) that previously supported the collection.

If you moved the collection to a different domain or intend to use a different System Center Virtual Machine Manager, you must recreate team project host groups and team project library shares in Team Foundation Server and the virtual machines, templates, and environments in Microsoft Test Manager.

To configure Lab Management resources

  1. Configure the application tier for Team Foundation.

    For more information, see Configuring Lab Management for the First Time.

  2. Recreate the golden master virtual machines and templates in the new SCVMM.

    For more information, see How to: Create and Store Virtual Machines and Templates Ready for Lab Management.

  3. Import the virtual machines and templates into the team project collection.

    For more information, see How to: Import a Virtual Machine or a Template from SCVMM.

  4. Recreate the environments for each team project.

    For more information, see How to: Create an Environment from Virtual Machines or Templates.

Configure Project Server Integration

You can skip this procedure if the team project collection that you are moving is not integrated with Microsoft Project Server. For more information, see Microsoft Team Foundation Server 2010 and Microsoft Project Server Integration Feature Pack.

If you moved a collection and intend to continue integration between it and Project Server, you must perform the following tasks:

  • Register the instance of Project Web Access or Project Web App (PWA) that supports an enterprise project plan with the application-tier server that hosts the moved team project collection.

  • Wait for the metadata to synchronize.

  • Unregister the application-tier server that formerly hosted the collection, if it does not host other collections that are integrated with Project Server.

To integrate the moved collection with Project Server

Configure Projects

You can skip this procedure if you moved the collection in the same domain and you want to allow access for the users of projects in that collection to this deployment of Team Foundation Server.

After you configure administrators for the moved collection, either you or those administrators must add users and groups to the projects in that collection. Depending on your deployment, you might also need to configure permissions for those users in SharePoint Products and Reporting Services.

To add users to team projects

To add resources to moved team projects

See Also

Tasks

Split a Team Project Collection

Connect a Microsoft Office Document to Team Foundation Server

Concepts

Team Foundation Server Architecture

The Team Foundation Administration Console

Interactions Between SharePoint Products and Team Foundation Server

Changing the Configuration of Your Deployment

Change History

Date

History

Reason

March 2011

Added information about deployments that integrate with Project Server.

SP1 feature change.