当前运行 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首先就像评论建议的那样,然后再次尝试更新。
更新
如果你真的不需要那个项目集合。你可以试试删除 它通过命令行。
%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/