当数据库不存在时,分离TFS项目集合

当我将一个项目集合添加到TFS时,它在中途崩溃。 它没有为集合创build数据库。 该集合显示在TFSpipe理控制台中,但它不会让我分离它,因为它说

TF246017:Team Foundation Server无法连接到数据库。 validation托pipe数据库的服务器是否可以运行,并且networking问题不会阻止与服务器的通信。

我如何摆脱这个鬼集合?

尝试修复数据库

dbcc checkdb ('TfsVersionControl',repair) 

如下所示: http : //dotnet.dzone.com/news/database-corruption-tfs-2005?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+zones%2Fcss+%28CSS+Zone%29

最好的select是使用下面的命令删除集合。

 syntax:TFSConfig Collection /delete /collectionName:[COLLECTION NAME] TFSConfig Collection /delete /collectionName:Project( here project is name of the collection) 

例如:

 C:\Users> cd.. C:\> cd Program Files\Microsoft Team Foundation Server 2010\Tools C:\Program Files\Microsoft Team Foundation Server 2010\Tools> TFSConfig Collection /delete /collectionName:Project Logging sent to file C:\ProgramData\Microsoft\Team Foundation\Server Configuration\Logs\CFG_TPC_AT_0710_134506.log Command: collection TfsConfig - Team Foundation Server Configuration Tool Copyright (c) Microsoft Corporation. All rights reserved. Deleting a Team Project Collection is an irreversible operation. A deleted collection can not be reattached to the same or another Team Foundation Server. Are you sure you want to delete 'Project'? (Yes/No) y Found Collection 'Project'. Deleting... The delete of collection 'Project' succeeded. 

这对我工作…

  1. Actions to perform on TFS 2010 1.1 Using the TFS console "Detach" the collection from the "TFS server" 1.2 Using the SQl Manager "Detach" the database for the corresponding TFS collection 2. Actions to perform on TFS 2012 2.1 Using the SQl Manager "attach" the database for the corresponding TFS collection 2.2 Make sure to give the TFS user account/s access to the database otherwise the TFS server will not be able to access it. 2.3 Using the TFS console "attach" the collection to the "TFS server"