Share via


Delete a Team Project Collection

You can delete team project collections that are no longer being used in your deployment of Visual Studio Team Foundation Server 2012 (TFS). By deleting a collection, you ensure that users do not accidentally connect to it and work on projects within that collection, and you help simplify your deployment. Additionally, in rare cases, creation of team project collections fails or the database becomes unusable. In those cases, deleting the faulty collection also helps you maintain your deployment.

To delete a collection, you must first detach it from TFS. However, if you detach a collection, you do not delete the database for the collection from SQL Server. To truly delete a collection, you must then manually delete the database for the collection from the SQL Server instance that hosts the collection database. Similarly, if you detach a collection, you do not delete the SharePoint site collection that hosted the team project portals for projects in that collection. To delete those portals, you must also delete the site collection that supported that collection.

Important

Ideally, each site collection supports only one team project collection, but it is possible for more than one collection to use the same site collection. You should verify that the site collection is not used by any other team project collection or for any other purpose before you delete the site collection.

You do not need to delete the database or the site collection, but the collection will not be truly deleted until you complete these steps. If you are deleting a collection for performance or space considerations, you should consider manually deleting the database from SQL Server and the site collection from SharePoint Products after you detach the collection.

Note

You can delete a team project collection at a command prompt by using the TFSConfig Collection command. Unlike deleting a collection from the administration console, when you use the TFSConfig Collection tool, you permanently remove any chance of reattaching the collection database. For more information, see Collection Command.

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 on the server or servers that are running the instance of SQL Server that hosts the databases for TFS

  • a member of the Farm Administrators group for the farm from which you are deleting the site collection, if your deployment uses SharePoint Products

For more information, see Team Foundation Server Permissions.

To delete a team project collection

  1. Open the administration console for Team Foundation.

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

  2. Expand the name of the server, expand Application Tier, and then choose Team Project Collections.

  3. In the list of collections, highlight the name of the collection that you want to delete.

  4. On the General tab, choose Detach Team Project Collection.

    The Detach Team Project Collection Wizard opens.

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

  6. Choose Next.

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

  8. If you want to change any settings, choose Previous. If they appear to be correct, choose Verify.

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

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

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

  12. Choose Close.

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

  13. Open SQL Server Management Studio, connect to the instance of the SQL Server Database Engine that hosts the collection database, and expand the instance.

  14. Highlight the name of the collection database (by default, TFS_CollectionName), and then delete the database.

    For more information, see the following page on the Microsoft website How to: Delete a Database.

  15. Open SharePoint Central Administration, and delete the site collection that supported the deleted collection.

    For more information, see the following page on the Microsoft website: Delete a site collection (SharePoint Foundation 2010) or Delete a Site Collection (Microsoft Office SharePoint Server 2007).

  16. If your deployment uses reporting, you can choose to delete the folders and reports used by projects that were in the deleted team project collection by using SQL Server Report Manager. For more information, see SQL Server documentation for deleting report folders.

See Also

Tasks

Create a Team Project Collection

Modify a Team Project Collection

Move a Team Project Collection

Split a Team Project Collection

Concepts

Team Foundation Server Architecture