TFS2015 tbl_Content increase

好久不见. 提交于 2021-01-28 05:38:44

问题


In the last two months we started using the vNext builds and releases (5 build/release definitions). This month we noticed an increase of the collection database (from ~5GB to 25GB).

I deleted and destroyed all builds of the XAML build definitions and I deleted all builds older than yesterday for the vNext build definitions.

Running the below SQL script:

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)

shows an increase of the tbl_Content over the last two months:

how can I reduce the database size? I tried already to shrink the SQL database/files.

TFS 14.102.25423.0 (Update 3)

SQL Server 12.0.4213.0


回答1:


In your scenario, the table grows a lot in May. So you need to check if there're many files check in to TFS, and if there're many builds runs in May.

To reduce the size of the tbl_Content table, you could refer to this blog: https://mattyrowan.com/2014/04/02/need-help-tfs-tbl_content-table-and-database-growth-out-of-control/

  1. Clean some old workspaces that you doesn't need any more.
  2. Run the tf destory command to delete those unnecessary source files permanently.
  3. Using TFS power tool to clean Test attachments and test results.


来源:https://stackoverflow.com/questions/44158019/tfs2015-tbl-content-increase

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!