Last night I set about resolving the at least one of the issues regarding undoing pending changes, mentioned in the previous post. It so happened that just before I was getting ready for the fix, my TFS users discovered they couldn't also add new files to the TFS source safe. Bummer! The server event logs pointed to the collation mismatch between the tempdb and the TFSVersionControl database.
SQL Server Collation Issue
The background to the collation issue is as follows. The TFS 2005 database was setup with the default collation which was SQL_Latin1_General_CI_AS. This database was actually a Developer Edition which worked without a hitch during the last several months TFS 2005 was in production. When I set about upgrading to the new TFS, I installed the SQL Server Enterprise edition on the new server with collation designed to Latin1_General_CI_AS. This was done with little research and no knowledge on my part about how different collations could have such drastic effects. When I restored the databases from the old TFS server to the new one, the restored databases defaulted to the old collation (SQL_Latin1_General_CI_AS).
The FIX
As part of the fix, I tried changing the database collations on both tempdb and TFSVersionControl databases to suit either. No luck!
After installing a named instance of SQL Server database I discovered that the default settings (Directory order, case-insensitive, for use with 1252 Char) in Collation Settings page of the SQL Server install wizard will lead a collation of SQL_Latin1_General_CI_AS. Voila!
So I set about uninstalling the SQL Server databases on the server. Reinstalled and attached the databases. Didn't work! I mean this time the TFS itself wouldn't work. Bugger. So I thought uninstall the TFS itself and reinstall. Now even the TFS wouldn't uninstall. Wouldn't repair either. Bugger x 2! I discovered amongst other things that if the TFS databases are messed up it would simply not work. I mean not work for anything including uninstall. So I fixed it with a simple hack. Delete the Team Foundation Server site in IIS. Tried uninstalling again and it worked.
The rest was simple. I reinstalled TFS, re-attached the the databases to the new SQL default instance with the collation settings of SQL_Latin1_General_CI_AS. So almost everything except for the Reports Server is working.
A rather painful fix for something that ideally shoud have simple fix. Microsoft and the SQL Server product developers aren't my favourite bunch of people right now, but I suppose I can live with that. If there's one lesson from all of this, then it is to learn and appreciate the world of SQL Server Collations. You'll get into a lot of shit if you don't consider it as one of the prime factors in any SQL Server migrations, restorations or just general installation and use.
Currently rated 4.5 by 2 people
- Currently 4.5/5 Stars.
- 1
- 2
- 3
- 4
- 5