自升级以来,本地 AzureDevops Server 2019 在 dbo.tbl_content 中保留了 10 倍的构建数据

Since upgrade, on-prem AzureDevops Server 2019 is retaining 10x build data in dbo.tbl_content

我的本地 Azure DevOps 2019 备份显示 .mdf 文件的大小增长不可持续

所以,我想我正在寻找需要清理的构建管道(不是释放管道)?从历史上看,我们曾尝试保留 366 天的旧构建日志,但按照我们目前的速度,我们无法做到。

我们有大约 40 个构建管道(一些历史悠久,不再 运行),inc 4 在提交时触发(CI)。

回复:保留政策...

在此了解ci任何帮助,但具体ci具体而言:

相关问题:TFS2015 tbl_Content increase

您可以尝试 运行 下面的查询来缩小日期范围:

SELECT ci.ContainerId,
c.ArtifactUri,
c.Name,
c.DateCreated,
SUM(fm.FileLength)
FROM tbl_ContainerItem ci
JOIN tbl_FileReference f
ON f.FileId = ci.FileId
JOIN tbl_FileMetadata fm
ON fm.PartitionId = 1
AND fm.ResourceId = f.ResourceId 
LEFT JOIN tbl_Container c 
ON c.ContainerId = ci.ContainerId 
AND c.PartitionId = 1 
WHERE f.PartitionId = 1 
AND ci.PartitionId = 1 
GROUP BY ci.ContainerId, c.ArtifactUri, c.Name, c.DateCreated

并且由于它与构建有关,请检查测试报告是否导致此问题。您可以参考此线程中的详细操作:TFS database growing too large

此外,您还可以尝试缩小 TFS/Azure DevOps 数据库中的事务日志。

  • How to shrink TFS database size