TFS2015 tbl_Content 增加 [英] TFS2015 tbl_Content increase

查看:36
本文介绍了TFS2015 tbl_Content 增加的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在过去的两个月中,我们开始使用 vNext 构建和发布(5 个构建/发布定义).本月,我们注意到收藏数据库有所增加(从约 5GB 增加到 25GB).

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

我删除并销毁了 XAML 构建定义的所有构建,并为 vNext 构建定义删除了所有早于昨天的构建.

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

运行以下 SQL 脚本:

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)

显示了过去两个月 tbl_Content 的增加:

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

如何减小数据库大小?我已经尝试缩小 SQL 数据库/文件.

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

TFS 14.102.25423.0(更新 3)

TFS 14.102.25423.0 (Update 3)

SQL Server 12.0.4213.0

SQL Server 12.0.4213.0

推荐答案

在您的场景中,表格在 5 月份增长了很多.所以你需要检查是否有很多文件签入到 TFS,以及是否有很多构建在 5 月份运行.

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.

要减小tbl_Content表的大小,可以参考这个博客:https://mattyrowan.com/2014/04/02/need-help-tfs-tbl_content-table-and-database-growth-out-失控/

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. 清理一些您不再需要的旧工作区.
  2. 运行 tf destory 命令 永久删除那些不必要的源文件.
  3. 使用 TFS 强力工具清理测试附件和测试结果.
  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.

这篇关于TFS2015 tbl_Content 增加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆