Answered by:

Damaged project collection on TFS 2013, no solution to delete it from server.

Question

I have a problem with one project collection on our TFS 2013 Update 2. I've been moving and updating one big project collection from TFS 2008 to TFS 2013, using in the middle TFS 2012. While restoring database backup something went wrong I suppose, but I
hadn't noticed it and I attached it to TFS. The project collection appeared on the list with collections but it's offline and damaged. I have tried delete it using command:

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 'XXX'? (Yes/No) yesFound Collection 'XXX'. Deleting...

I have tried also detach from TFS admin console, and I get this error message:

TF401219: The team project collection 'XXX' cannot be detached because its version ID is different than the ID for the configuration database. The collection has the following version: Dev11.M55. The Team Foundation Server is at the following version:
Dev12.M62.

Friday, May 9, 2014 11:00 AM

Answers

Hi,
I am sorry that we introduced this regression in TFS 2013.2. The issue will be fixed in TFS 2013.3. To workaround this problem, you can drop your damaged collection database and create a fake collection database using the script below. Make sure to set @collectionDatabaseName
and @serviceLoginName correctly before running this script. Once you created the fake database using the script, you can execute
tfsconfig collection /delete /collectionName:<collection-to-delete> command to delete your collection:

All replies

TFS 2013 Update 2 database’s TFS_SERVICE_LEVEL version is Dev12.M62, you can check TFS database’s TFS_SERVICE_LEVEL version in SQL Server Management Studio: right-click on TFS database>>Properties>>Extended Properties
tab, then you can find this’s database’s TFS_SERVICE_LEVEL version value in right panel.

The Dev11.M55 value is TFS 2012 Server database’s TFS_SERVICE_LEVEL version, it seems this moved collection version didn’t be upgrade after you attached it into your TFS 2013 Server. We can ensure this issue relate your TFS database, but we don’t
recommend edit TFS database directly, it may cause the unknown issues.

For this issue, I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

I've checked it. You have got right. This database is Microsoft Team Foundation Server 2012 M55 ( Dev11.M55 ) I can see one small detail in extended properties in SQl Server Management Studio. On this broken database there is 2 properties which are absent
on healthy databases, TFS_SNAPSHOT_COLLECTIONID and TFS_SNAPSHOT_STATE.

Hi,
I am sorry that we introduced this regression in TFS 2013.2. The issue will be fixed in TFS 2013.3. To workaround this problem, you can drop your damaged collection database and create a fake collection database using the script below. Make sure to set @collectionDatabaseName
and @serviceLoginName correctly before running this script. Once you created the fake database using the script, you can execute
tfsconfig collection /delete /collectionName:<collection-to-delete> command to delete your collection:

Our TFS administrators are getting the same error when upgrading TFS 2012 to TFS 2013. As per a reply in this forum post, this issue should be resolved in TFS 2013 Update 3. I reviewed the release notes for TFS 2013 Update 3(Bug fixed -
TFS server category) but don't see this listed. Can you please provide an update?