Answered by:
trying to access an Orphaned TFS database (problems with corrupt TFS configuration database)

Question
-
I was referred to this forum based on the type of problem that I am up against. My original call for help was in the Visual Studio forums.
Backstory: During a botched upgrade of the TFS system, my configuration database became corrupt and the application cannot use it. Because of a "glitch" with the backup, the restore did not work and it left me with a unusable system. I was able to create a new configuration database, for TFS, but I do not have any collection databases attached to it.
My problems are:
- Upgrade process states that the old configuration database has already been updated and won't attempt an upgrade on it. trying to use the old configuration database gives me an error stating that it is corrupt.
- I would use the new configuration database, but the collection databases are still "attached" to the old configuration and will not attach to the new configuration. I need a way to force those databases to "detach", so I can then attach them to the new configuration. (in TFS an attach\detach is different than in SQL. A Collection (contained in a database) gets attached to TFS, so TFS can manage it. When you want to move it you would detatch it from TFS and then use SQL manager to manipulate the database and then attach it later. My guess is that TFS changes something inside the database that labels it as attached to a TFS system)
Heath
Thursday, October 31, 2013 7:44 PM
Answers
-
I'm afraid that this is also the wrong forum for you - your issue clearly requires good knowledge about the internals of the TFS databases. Which forum were you in originally? I would try http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=tfsversioncontrol although there are a couple more TFS forums; maybe http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=tfsadmin is better.
Then again, the issue may be too difficult for a forum, and you may be better off opening a support case.
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se- Marked as answer by Fanny Liu Monday, November 11, 2013 6:18 AM
Thursday, October 31, 2013 11:03 PM -
I reviewed the thread in the TFS forum, and Cece does not advice you to go an SQL Server forum to ask the same question - he advices you to go here to get help with the corrupted database. And that is indeed not a bad advice. Unfortunately, though, you asked the question from the same perspective as you did in the TFS forum, and this is pointless in a forum which does not have expertise in TFS.
But let's look at the problem purely from an SQL Server perspective. That is, you have a corrupt database, and the backup fails to restore.
Have you run DBCC CHECKDB on the corrupt database?
What error message do you get when you try to restore the database?
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Saturday, November 2, 2013 7:11 PM
All replies
-
I'm afraid that this is also the wrong forum for you - your issue clearly requires good knowledge about the internals of the TFS databases. Which forum were you in originally? I would try http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=tfsversioncontrol although there are a couple more TFS forums; maybe http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=tfsadmin is better.
Then again, the issue may be too difficult for a forum, and you may be better off opening a support case.
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se- Marked as answer by Fanny Liu Monday, November 11, 2013 6:18 AM
Thursday, October 31, 2013 11:03 PM -
Thank you.
My original request for help was in
http://social.msdn.microsoft.com/Forums/en-US/home?forum=tfsadmin
and that moderator suggested I go here.
I can try the TFSVersionControl and see if they have a different solution.
Heath
Friday, November 1, 2013 7:33 PM -
My original request for help was in
http://social.msdn.microsoft.com/Forums/en-US/home?forum=tfsadmin
and that moderator suggested I go here.
I can try the TFSVersionControl and see if they have a different solution.Unfortunately, the Microsoft people who are paid to monitor the forum, often try to pass questions outside their comfort zone elsewhere. The one reason I suggested the Version Control forum is because it is the only TFS forum I follow. (Although I have not been there for a while, coming back now to the MSDN forums thanks to the resurrection of the NNTP bridge.)
I can understand that the MSDN person tried to refer you to SQL Server, and we can possibly help you with a corrupt database, but not to make different TFS databases consistent with each other, at least not from our knowledge of SQL Server alone.
As I said in my first post, I suspect that you will have to open a support case; this is probably to difficult to sort out in a forum.
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.seFriday, November 1, 2013 11:26 PM -
I reviewed the thread in the TFS forum, and Cece does not advice you to go an SQL Server forum to ask the same question - he advices you to go here to get help with the corrupted database. And that is indeed not a bad advice. Unfortunately, though, you asked the question from the same perspective as you did in the TFS forum, and this is pointless in a forum which does not have expertise in TFS.
But let's look at the problem purely from an SQL Server perspective. That is, you have a corrupt database, and the backup fails to restore.
Have you run DBCC CHECKDB on the corrupt database?
What error message do you get when you try to restore the database?
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Saturday, November 2, 2013 7:11 PM