为什么TFS允许孤立内容以及如何摆脱它?

我的TfsVersionControl数据库已经增长到40 GB.我们最近在文件夹树上做了一个TFS Destroy,应该已经清除了至少10 GB,但它似乎没有任何效果.

当我查看TfsVersionControl中的表时,我首先感到震惊的是,数据库中根本没有外键.运行一些查询,我发现有一些孤立正在进行:

> tbl_Content有13.9 GB的记录没有相关的tbl_File记录
> tbl_File和tbl_Content有2.4 GB,没有相关的tbl_Namespace记录

清理作业似乎每晚运行(prc_DeleteUnusedContent)并且手动对数据库运行它不会删除任何孤儿.我在日志中看到它在3月16日失败的清理工作,这是我销毁大量数据后的早晨.该错误是由完整的事务日志引起的.

这个错误可能是我留下所有这些无法删除的孤立数据的原因吗?如何永久销毁这些不需要的内容?

最佳答案 请参阅MSDN上的博客文章

http://social.msdn.microsoft.com/Forums/en-SG/tfsversioncontrol/thread/5f3f8916-1c6d-46f7-9dae-2cdaeaee98db

正如TFS团队的Chandru所说:

This is due to a bug in TFS 2008 – where if the nightly job failed, it caused this problem. Please contact microsoft support and they can provide you a fix for it. Please do not attempt to fix this yourself.

点赞