2016-09-26 55 views
2

目前運行TFS 2013更新4(12.0.31101.0(Tfs2013.Update4))TFS 2013需要刪除的集合,被套牢被服務

我們正試圖升級到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. 

上述數據庫用於Default Team Project Collection,我們不使用它。這個集合是離線的,已經有好幾個月了。該集合中沒有任何內容,我們不需要保留它。我們只需要將其刪除,因爲它阻止了我們的升級。

查看項目集合狀態,我可以看到有一個失敗的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. 

希望有人能提供一些解決此問題的想法。

乾杯 菲爾

+0

您是否無法從Team Foundation Server管理控制檯分離集合?這樣升級嚮導應該停止嘗試升級它。 –

+0

您是否擁有默認Team Project Collection的備份數據庫? –

+0

@ToreØstergaard不能對該集合做任何事情。我也嘗試重新應用更新4,但它停止與TFS 2015升級完全相同的錯誤。 – philcart

回答

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網站集合支持刪除收藏(如果有的話)。

+0

團隊項目集合甚至無法分離。我收到錯誤, 'TF401218:無法分離項目集合'DefaultCollection'。主機正在進行維修。服務可能失敗,需要重新啓動並完成,然後主機才能脫離。# – philcart

+0

如果您確實不需要該項目集合。您可以嘗試通過命令行將其刪除。詳情請參閱https://rules.ssw.com.au/do-you-know-how-to-delete-a-team-project-collection。然後刪除集合數據庫'Open SQL Server Management Studio,連接到承載集合數據庫的SQL Server數據庫引擎實例,並展開實例。 突出顯示集合數據庫的名稱(默認爲TFS_CollectionName),然後刪除數據庫。並刪除支持已刪除集合的SharePoint網站集(如果有)。 –

+1

乾杯,刪除選項固定的東西。爲什麼地球上很難找到這種信息,而不必跳轉到第三方網站? – philcart