【问题标题】:TFS 2013 Need to remove collection that is stuck being servicedTFS 2013 需要删除卡在服务中的集合
【发布时间】:2016-09-28 16:21:20
【问题描述】:

当前正在运行 TFS 2013 Update 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.

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

干杯 菲尔

【问题讨论】:

  • 您是否无法从 Team Foundation Server 管理控制台分离集合?这样升级向导应该停止尝试升级它。
  • 您是否有默认团队项目集合的备份数据库?
  • @ToreØstergaard no 不能对那个集合做任何事情。我也尝试重新应用更新 4,但它停止并出现与 TFS 2015 升级完全相同的错误。
  • @Patrick-MSFT,不,我们没有未“损坏”的集合的备份,因为项目集合没有被使用,它没有包含在我们的常规中备份保留。

标签: tfs


【解决方案1】:

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

您也可以按照评论的建议先选择Detach the Collection,然后再次尝试更新。

更新

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

  1. 在 TFS 服务器上,打开管理命令提示符并切换到 TFS 工具目录。

    %programfiles%\microsoft team foundation server[versionnumber]\tools
    
  2. 输入命令:

    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 网站集。(如果有)。

【讨论】:

  • 团队项目集合甚至无法分离。我得到了错误,TF401218: The project collection 'DefaultCollection' cannot be detached. The host is in the process of being serviced. The servicing may have failed and needs to be restarted and completed before the host can be detached.
  • 如果你真的不需要那个项目集合。您可以尝试通过命令行删除它。详情请参考rules.ssw.com.au/…。然后删除集合数据库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 网站集合。(如果有)。
  • 干杯,删除选项修复了问题。为什么不跳转到第三方网站就很难找到这类信息?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-07-21
  • 1970-01-01
  • 2018-07-29
  • 1970-01-01
  • 1970-01-01
  • 2016-11-29
  • 1970-01-01
相关资源
最近更新 更多