Split a Team Project Collection

Visual Studio Team Foundation Server 2012

You can change the size or composition of a team project collection by splitting it into multiple collections, but this process requires that you perform many steps. These steps include creating a copy of the collection database by backing up the original collection database, restoring it using a different name, and attaching that renamed database to Team Foundation Server (TFS). After you restore the renamed collection database, you will have two functional team project collections in TFS, but those two collections will still share the same reporting folder and site collection. Reporting and team project portals will continue to function, but they will not be separated from the original team project collection. You must decide whether to move any reports that are associated with the new team project collection to a separate folder, to split the site collection that hosts team project portals, or both. These changes require extra steps, but they help ensure that each collection remains a discrete unit.

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

  • You want the projects in a collection to align with business units in your organization, and the projects in the collection are now owned by separate units.

  • You upgraded from an earlier version of TFS, you have only one collection, and you want to organize your projects into separate collections for security or business alignment reasons.

  • You want to change ownership of some of the projects in the collection to a remote office that has its own deployment of TFS. This scenario requires that you first split a collection and then move one of the resulting collections to the remote office deployment.

    NoteNote

    The procedures in this topic support only splitting a team project collection. If you want to move a collection after you split it, see Move a Team Project Collection.

In this topic

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

  1. Delete Lab Management Resources

  2. Detach the Collection

  3. Back Up the Collection Database

  4. Restore the Collection Database With A Different Name

  5. Attach the Original Collection Database

  6. Attach the Renamed Collection Database

  7. Delete Projects From the Split Collections

  8. Reconnect SharePoint Web Application Resources

  9. Split Reports

  10. Start the Collections

  11. Rebuild the Data Warehouse and Analysis Services

  12. Reconfigure Team Project Portals

  13. Configure Lab Management Resources

  14. Configure Users and Groups for the Split Team Project Collections

  15. Configure Users and Groups for Projects

  16. Split the Original Site Collection to Support the Split Team Project Collections

  17. Synchronize Integration with Microsoft Project Server

Required Permissions

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

  • 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 TFS

If your deployment uses SharePoint Products, it is strongly recommended that the service account for TFS be a member of the Farm Administrators group.

NoteNote

You can split a team project collection without granting this membership to the service account for TFS. However, you will see errors 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 split operation.

Delete Lab Management Resources

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

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

  • You are splitting 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, from the collection database, the resources that Lab Management uses. 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.

Detach the Collection

Before you split a collection, you must first detach it from the deployment of TFS on which it is running. When you detach a collection, all jobs and services are stopped, and then the collection database is stopped. In addition, the detach process copies over the collection-specific data from the configuration database and saves it as part of the team project collection database.

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 split.

    For more information, see

Open the Team Foundation Administration Console.
  • Choose Team Project Collections, and in the list of collections, choose the collection that you want to split.

    In the example below, the administrator chooses "TFS Fabrikam Collection 2."

  • On the General tab, choose Stop Collection.

    The Team Project Collection Status Reason dialog box opens. Optionally, provide a reason for stopping the collection to be displayed to your users. Choose Stop, and wait for the collection to stop. When it is stopped, its status will show as Offline.

  • On the General tab, choose Detach Collection.

    The Detach Team Project Collection Wizard opens.

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

  • Choose Next.

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

  • If you want to changes any settings, choose Previous. If they appear to be correct, choose Verify.

  • When all the readiness checks have completed successfully, choose Detach.

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

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

  • Choose Close.

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

  • Back Up the Collection Database

    After you have detached the collection, you must back up its database before you can restore a copy to the server with a different name. That copy will become the database for the part of the original collection that you want to split into another collection. To perform this task, you must use the tools that are provided with SQL Server.

    To back up a collection database

    • For information about how to manually back up and restore individual databases, see the following pages on the Microsoft Web site, and make sure to choose the version of SQL Server that matches your deployment:

    Backing Up and Restoring Databases in SQL Server and Create Back Up Schedule and Plan.
    Important noteImportant

    If your original deployment used the Enterprise or Datacenter editions of SQL Server, and you want to restore the database that you want to split to a server running Standard edition, you must use a backup set that was made with SQL Server compression disabled. Unless you disable data compression, you will not be able to successfully restore Enterprise or Datacenter edition databases to a server running Standard edition. To turn off compression, follow the steps in the Microsoft Knowledge Base article.

    Restore the Collection Database

    As part of splitting the collection, you must restore the backup of the collection database to an instance of SQL Server that is configured to support the deployment of TFS. When you restore the database, you must give it a different name from the name of the original collection database.

    TipTip

    The steps below give a general overview of how to restore a team project collection database in SQL Server 2012 using SQL Server Management Studio. For more information about how to manually back up and restore individual databases, see the following page on the Microsoft Web site, and make sure to choose the version of SQL Server that matches your deployment:

    Backing Up and Restoring Databases in SQL Server.

    To restore the collection database with a new name

    1. Open SQL Server Management Studio and connect to the instance that hosts the database for the team project collection that you want to split.

    2. In Object Explorer, expand Databases, open the sub-menu for the database you want to split, and then choose Tasks, choose Restore, and then choose Database.

      The Restore Database window opens on the General page.

    3. In Source, make sure that the team project collection database is chosen. In Destination, provide a name for the copy of the database. That name should match the name of the split team project collection. In Restore plan, make sure that the backup sets to restore are the ones you want to restore to. To make sure that these are valid sets, choose Verify Backup Media and then, in Select a page, choose Options.

    4. In Restore options, leave all the check boxes blank. Make sure that Recovery state is set to RESTORE WITH RECOVERY. In Tail-Log Backup, clear the Leave source database in the restoring state check box, and then choose OK.

      TipTip

      If the restore operation fails with an error message indicating that the database is in use and cannot be overwritten, you might need to manually configure all the logical file names to reflect the new name for the database. In Select a page, choose Flies, choose the ellipsis button next to each file being restored, and make sure that the names of the files reflect the new name for the database, not the old one. Then try the restore operation again.

    Attach the Original Collection Database

    After you have restored the database with a different name, you must reattach the original collection database to the deployment of TFS.

    NoteNote

    If your deployment uses SharePoint Products and the service account for TFS is not a member of the Farm Administrators group, warnings will appear when you attach the collection. This behavior is expected.

    To attach the collection

    1. Open the administration console for Team Foundation.

    2. Choose Team Project Collections, and then choose Attach Collection.

      The Attach Team Project Collection Wizard opens.

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

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

    5. On the Enter the team project collection information page, provide a name for the collection in Name if one is not already present. Since this is the original collection, you can choose to leave the name the same as it was before.

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

    7. Choose 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, choose Previous. If all the settings are correct, choose Verify.

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

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

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

    13. Choose Close.

      The team project collection appears in the list of collections in the administration console. If the collection state is listed as Online, choose the collection from the list, and on the General tab, choose Stop Collection.

    Attach the Renamed Collection Database

    After you attach the original collection database, you must attach the renamed collection to the deployment of TFS. When this collection is attached, it will remain stopped. You will not be able to start it until all duplicate projects have been removed.

    NoteNote

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

    To attach the renamed collection database

    1. Open the administration console for Team Foundation on the server that hosts the application tier for the deployment that will host the split collection.

    2. Choose Team Project Collections, and then choose Attach Collection.

      The Attach Team Project Collection Wizard opens.

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

    4. In the Databases list, choose the renamed collection database, and then choose Next.

    5. On the Enter the team project collection information page, type a name for the renamed collection in Name that differs from the name of the original name of the collection.

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

    7. Choose 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, choose Previous. If all the settings are correct, choose Verify.

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

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

      NoteNote

      If the collection is supported by a SharePoint Web application, a warning icon will appear for the attach status of the SharePoint Web application. Similarly, if the original collection included reporting, a warning icon will appear for the attach status for reports. This behavior is expected, and you can ignore it.

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

    13. Choose Close.

      The name of the collection appears in the list of collections in the administration console, and its status should display as Offline.

    Delete Projects on the Split Collections

    Now that you have two copies of the collection attached to TFS, you must delete each project from either the original collection or the renamed collection so that no project remains in both collections.

    Important noteImportant

    A project cannot exist in more than one collection. Until you delete all duplicated projects between the split collections, you will not be able to start the renamed collection.

    To delete projects from the collections

    1. Open the administration console for Team Foundation on the server that hosts the split collections.

    2. Choose Team Project Collections, and in the list of collections, choose the original team project collection that you stopped in order to split it.

    3. Choose the Team Projects tab.

    4. In the list of team projects, choose a project that you want to delete from the collection, and then choose Delete.

      The Delete Team Projects dialog box opens.

    5. Select the Delete workspace data check box, leave the Delete external artifacts check box cleared, and then choose Delete.

      If the Delete external artifacts check box is not cleared and your team project is configured to use Lab Management, the virtual machines and templates that are associated with the project will be deleted from System Center Virtual Machine Manager. They will no longer be available to the team project in the renamed collection.

    6. When you have finished deleting the projects you do not want hosted in the original team project collection, choose the renamed team project collection from the list of collections. Then, on the Team Projects tab, delete the projects you do not want hosted on the new collection.

    7. Repeat these steps until both collections contain a set of unique projects.

      NoteNote

      For the time being, these collections will still use the same SharePoint site collection for their team project portals. You can configure them to use different site collections. The steps to do this are listed later in this topic.

    Reconnect Resources for the SharePoint Web Application

    After you attach the renamed collection and remove all duplicate projects, you must repair the connection to the SharePoint Web application. Repairing the connection ensures that all connections are correctly set between the Web application and the original and renamed collections.

    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. Choose SharePoint Web Applications, and in the list of Web applications, choose the Web application that supports the collections that you just attached.

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

    3. Choose Repair Connection, and in the Repair the connection to a SharePoint Web Application dialog box, choose Repair.

    4. When the Status window reports Reconnect operation succeeded, choose Close. This might take a few minutes. In addition, you might see some errors as part of this process, since the two collections are still using the same SharePoint default site location for their team project portals. This is expected behavior.

    Split Reports

    You can skip this procedure if your deployment does not include a server that is running SQL Server Reporting Services or if you do not want to split reports into folders that reflect the separate collections.

    After you delete projects, you must move the reports that the split collection uses into a different folder, and you must delete them from the original folder.

    Important noteImportant

    The report folders exist in both locations. Make sure that you move all reports appropriately before you delete any report folders.

    To split reports into separate folders

    1. In Report Manager, move the reports that support the split collection into the appropriate folders for that collection.

      For more information, see the following topic on the Microsoft Web site:

    Move Items Page.
  • If your deployment utilizes a SharePoint Web application, you might need to repair the connection again after you move the reports before they will appear correctly. If reports do not appear correctly, follow the steps in the previous procedure to repair the connection.

  • Start the Team Project Collections

    After you delete projects, you must restart the renamed collection before you can configure users and groups for the split collections.

    To start a team project collection

    1. Open the administration console for Team Foundation on the server that hosts the split collections.

    2. Choose Team Project Collections, and in the list of collections, choose the collection that you stopped in order to split it.

    3. On the General tab, choose Start Collection.

      The collection starts.

    4. Repeat step 2 for the collection that you attached with a new name.

    Rebuild the Data Warehouse and Analysis Services

    You can skip this procedure if you do not have reporting configured as part of your deployment.

    If the deployment on which you have split a collection uses a report server, you must rebuild the warehouse for Team Foundation and the database for Analysis Services. You must perform this step to ensure that reports and dashboards work correctly for the deployment after you split the collection and that no conflicts occur with other collections in the deployment.

    To rebuild the data warehouse and the Analysis Services database

    1. Open the administration console for Team Foundation.

    2. In the navigation bar, choose Reporting.

    3. In Reporting, choose Start Rebuild.

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

      NoteNote

      The warehouses will continue to be rebuilt and the data will continue to be repopulated after the Start Rebuild action finishes. Depending on the size of your deployment and the amount of data, the whole process might take several hours to complete.

    Reconfigure Team Project Portals

    You can skip this procedure if your deployment does not use SharePoint Products.

    After you start both collections, you must reconfigure the team project portals for projects in each collection so that those portals reflect the correct data for those projects.

    To reconfigure team project portals

    • Open Team Explorer, connect to each team project collection, and for each team project, configure the URL for the SharePoint site. For each team project, choose Settings, choose Portal Settings, and make sure that the Reports and dashboards refer to data for this team project check box is selected.

    Configure Lab Management Resources

    You can skip this procedure if you split 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. You must also recreate team project library shares in TFS 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 SCVMM Environments.
  • Recreate the golden master virtual machines and templates in the new SCVMM and import virtual machines and templates into the team project collection.

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

  • Recreate the environments for each team project.

    For more information, see Creating an SCVMM Environment Using Stored Virtual Machines and Templates.

  • Configure Users and Groups for the Split Team Project Collections

    You can skip this procedure if both split collections will remain in the same domain and you want to allow access for the administrators of the original collection to both collections.

    After you have split a collection, you must update the permission groups for both collections with users and groups that will administer those collections.

    To configure users and groups for the collections

    • For more information, see

    Set Administrator Permissions for Team Project Collections.

    Configure Users and Groups for Projects

    You can skip this procedure if the split collections will remain in the same domain and you want to allow access for the users of projects in the original collection to both collections.

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

    To configure access for users to team projects

    • For more information, see

    Add Users to Team Projects and Add team members.

    Split the Original Site Collection to Support the Split Team Project Collections

    You can skip this procedure if your deployment does not use SharePoint Products or if you would rather continue to use the original site collection to support both team project collections.

    You can continue to use the same site collection in SharePoint Products to support both split collections. Team projects in both collections will use the same team project portals as before. All portals are hosted on the site collection that supported the original team project collection. However, this configuration not only complicates the one-to-one relationship between a team project collection and a site collection but also makes restoring your deployment potentially more difficult. To avoid this complexity, you can split the site collection that supported the original team project collection to reflect the split that you made for the team project collections.

    To split the site collection and redirect the split team project collections to use the split site collections

    1. For information about how to split a site collection, see the following pages on the Microsoft website:

      • For SharePoint Foundation 2010, see

    Move site collections to a new database (split a content database).
  • For Microsoft Office SharePoint Server 2007, see Move site collections to a new database (split a content database).

  • For Microsoft SharePoint Server 2010, see Move site collections between databases.

  • TipTip

    Make sure that you configure user permissions and access to the site collections to match the user access to the team project collections, as detailed earlier in this topic.

  • Configure any affected team project collection to utilize the split site collection by opening the administration console, choosing the collection from the list of the team project collections, and on the SharePoint Site tab, choosing Edit Default Site Location.

  • Reconfigure the team project portals for team projects in each collection so that those portals reflect the correct data for those projects.

    For more information, see Reconfigure Team Project Portals earlier in this topic.

  • Synchronize Integration with Microsoft Project Server

    You can skip this procedure if the team project collection that you are splitting is not integrated with Microsoft Project Server.

    You do not need to take any steps to continue synchronizing data between the collection and Project Server after you have split the collection unless you also plan to move the collection to a different server. In that case, you must follow the steps for moving a collection after you split the collection. For more information, see

    Move a Team Project Collection.

    After you split your team project collection, you must wait for the metadata to update as part of the synchronization between TFS and Microsoft Project Server. After synchronization, your data should appear correctly in Project Server. For more information, see Change the Configuration of Your Deployment.

    To verify synchronization

    • After you have split a collection, wait for the data to synchronize. This process happens automatically on a predetermined schedule. For more information, see Overview of the Synchronization Process for Team Foundation Server and Project Server Integration.

    • If one of the split collections will no longer synchronize with Project Server, unmap it by using the TFSAdmin ProjectServer /UnmapPWAFromCollection command with the /force option.

      For more information, see Map a Team Project Collection to an Instance of PWA, Change the Configuration of Your Deployment, and Remove a Component from Participating in Data Synchronization.

    See Also