Sql-server – Team Foundation Server 2013 and Large SQL Tables

sql serverteam-foundation-server

I have a Windows 2008 R2 virtual machine running Team Foundation Server 2013 and MS SQL Server Express. We are a small (<10 programmers) development shop and have 3-4 collections in TFS. We stood this system up 1.5 months ago. Today TFS stopped working with the error:

TF30042: The database is full. Contact your Team Foundation Server administrator.

Sure enough, upon investigation of the SQL tables that underpin TFS. I found one that had grown to over 10 GB, which is the limit for SQL Express. Investigation of the error logs on the server confirms:

CREATE DATABASE or ALTER DATABASE failed because the resulting cumulative database size     would exceed your licensed limit of 10240 MB per database.

The obvious solution is to move to SQL Server 2008, which we are doing. However, I wanted to know if it is normal for TFS to create tables like this? 10 GB in six weeks? Does anyone know how to clean or manage what goes into the SQL tables underlying TFS? Any help is much appreciated.

EDIT

We are doing a small automated build and a few automated test runs on a continuous basis whenever someone checks in. I have read at http://blogs.msdn.com/b/bharry/archive/2011/10/31/tfs-databases-growing-out-of-control.aspx that this can cause large SQL tables. Does anyone know how to delete the unneeded data from this operation?

Best Answer

According to: https://mgrowan.wordpress.com/2014/04/02/need-help-tfs-tbl_content-table-and-database-growth-out-of-control/

Update 4 April 2014: Something has happened overnight. I’m assuming the workspace clean has caused it. We now have 115 GB space available! What’s odd though is that the tbl_Content size has dropped that space. What does that table have to do with workspaces? Some insights into how this is working so we can manage our systems would be appreciated.

So, try to clean your Workspaces. The automatic build might leave some of them. You can use the free TFS Sidekicks to do this.