TFS 2013 需要删除卡在服务中的集合

标签 tfs

当前运行 TFS 2013 更新 4 (12.0.31101.0 (Tfs2013.Update4))

我们正在尝试升级到 TFS 2015 并且失败并显示错误

[Error  @18:03:16.990] TF255430: The database Tfs_DefaultCollection was partially upgraded during a failed upgrade. You must restore your data from a backup to its original state to continue.

上述数据库用于默认团队项目集合,我们不使用它。该集合已离线,并且已经存在好几个月了。该集合中没有任何内容,我们无需保留它。我们只需要删除它,因为它阻止了我们的升级。

查看项目集合状态,我可以看到有一个失败的 ApplyPatch 作业。已尝试重新运行该作业,但它继续返回以下失败消息。
[18:45:10.700]   Database: Tfs_DefaultCollection, Sql Instance: MDCPTFS02
[18:45:10.967]   [Error] TF400744: An error occurred while executing the following script: CollectionFrameworkDev10ToDev11CTP1.sql. Failed batch starts on the line 336. Statement line: 8. Script line: 343. Error: 1750 Could not create constraint. See previous errors.
[18:45:10.990]   Microsoft.TeamFoundation.Framework.Server.TeamFoundationServicingException: TF400744: An error occurred while executing the following script: CollectionFrameworkDev10ToDev11CTP1.sql. Failed batch starts on the line 336. Statement line: 8. Script line: 343. Error: 1750 Could not create constraint. See previous errors.

希望有人可以提供一些解决此问题的想法。

干杯
菲尔

最佳答案

如果您有备份数据库,最简单和安全的方法是按照上面的说明“您必须将备份中的数据恢复到原始状态才能继续”。恢复了集合,重新运行更新,一切都应该运行良好。最后,您只需要删除冗余集合。

您也可以选择Detach the Collection首先就像评论建议的那样,然后再次尝试更新。

更新

如果你真的不需要那个项目集合。你可以试试删除 它通过命令行。

  • 在 TFS 服务器上,打开管理命令提示符并更改为 TFS 工具目录。
    %programfiles%\microsoft team foundation server[versionnumber]\tools
    
  • 输入命令:
    TFSConfig Collection /delete /collectionName:[COLLECTION NAME]
    

  • 详情请引用此博客:how to delete a Team Project Collection

    然后删除收藏数据库 Open SQL Server Management Studio, connect to the instance of the SQL Server Database Engine that hosts the collection database, and expand the instance. Highlight the name of the collection database (by default, TFS_CollectionName), and then delete the database.并删除支持已删除集合的 SharePoint 网站集。(如果有)。

    关于TFS 2013 需要删除卡在服务中的集合,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39712721/

    相关文章:

    tfs - 从文件中读取 TFS 构建变量

    tfs - 通过 TFS 发布定义中的电子邮件批准进行持续集成

    .net - TFS 静默修复 .sln 文件 - 有办法阻止它吗?

    c# - VS2010 上的 TFS,合并代码问题

    visual-studio - 将项目从自定义模板添加到 VS 不会将其添加到 TFS

    c# - TFS 搁置集和代码审查

    具有 CMMI 级别 3 和 4 的 TFS 项目管理

    tfs - VS30063 : You are not authorized to access

    tfs - 如何从远程 powershell 脚本设置任务变量?

    TFS 2017 代理 : and error occured while sending the request