TFS Databases grows for all sorts of reasons. Some common sources of
runaway growth include using build or release automation without
configuring appropriate retention policies, creation of a
small number of very large items (work items, version control files,
etc.) by humans or tooling, and so forth. We have work on the backlog
to make the distribution of space in TFS databases more discoverable.
You could try to use a sql script such as below to show a increase of the tbl_Content
over the last months:
select DATEPART(yyyy, CreationDate) as [year],
DATEPART(mm, CreationDate) as [month],
count(*) as [count],
SUM(DATALENGTH(Content)) / 1048576.0 as [Size in Mb],
(SUM(DATALENGTH(Content)) / 1048576.0) / count(*) as [Average Size]
from tbl_Content
group by DATEPART(yyyy, CreationDate),
DATEPART(mm, CreationDate)
order by DATEPART(yyyy, CreationDate),
DATEPART(mm, CreationDate)
It's able to know to look at the distribution of "owners" for the data in tbl_Content
through a SQL query. Detail steps please refer Aaron Hallberg's reply in this similar question: TFS Database size
To reduce the size of the tbl_Content table, you could refer to this blog: TFS tbl_Content Table and Database growth out of control,it can be summed up in three steps in general:
- Clean some old workspaces that you doesn't need any more.
- Run the tf destory command to delete those unnecessary source files permanently.
- Using TFS power tool to clean Test attachments and test results.