TFS Upgrade and SQL Server Collation fixed

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.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

TFS Upgraded and Migrated

The TFS upgrade and migration has been a success. It certainly wasn't a smooth ride. It took me two rounds to knock the beast into place. The first round failed for some unknown reason, so I repeated the process but with a clean install of everything.

The upgraded TFS works fine except when you undo pending changes for source files. The undo process itself seems to be working fine, but for some reason it throws an error on the client side and logs an event on the server event logs. This issue is well described here (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2790907&SiteID=1).

If you like me upgraded the Sharepoint version on TFS2005 from 2.0 to 3.0, your sharepoint databases will most likely have a different name to that used by TFS2008/WSS3.0. During the database restoration proces, remember to restore to the database used by TFS2008/WSS3. Otherwise your Sharepoint Services will not work and you will not be able to add projects to your new TFS.

On my TFS2005 server, the WSS and the SQL Server Reports worked on different IIS port numbers. If you follow the upgrade process to the letter, you will end up with the same port number for both Reports and WSS. There are fixes for it in two different places affecting the Team Web Access, WSS Project Sites... Have to run along now. Will talk about this in another post.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

TFS Upgrade tonight

Last Friday I installed the trial version of TFS 2008 on our new server. Installation of this version was a breeze, with absolutely no problems to report. Team Web Access, like before was a separate download and install.

Tonight I will be upgrading and migrating from the old server and TFS 2005. The plan is simple:

  1. Backup the old server
  2. Upgrade the old server to TFS2008
  3. Backup TFS2008 on the old server
  4. Restore old server backup on the new server with TFS2008

Resources helping me tonight:
http://msdn2.microsoft.com/en-gb/library/ms404869(printer).aspx
http://msdn2.microsoft.com/en-gb/library/ms253070.aspx

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Sonic DLA and January MSDN DVDs = Bad Mix!

The other day I downloaded the Visual Studio DVD ISO's from MSDN Subscriber site. After copying the images onto the DVD drives, I tried launching the DVDs. No luck! Tried mounting the images as virtual drives. No luck! Tried on a colleagues laptop and it still wouldn't open. Worse still, the DVD (and the virtually mounted image) sends either (depending on how you try to access the disk) the explorer.exe or one of the svchost.exe processes crazy. The CPU Usage goes over 50% and renders the machine useless leaving a force restart as the only option.

I also noticed the DLACTRLW.EXE process refusing to normally shutdown. So just then, I tried disabling the Sonic DLA (Drive Letter Access) which supposedly enables the drag-and-drop feature for my DVD recorder. Tried accessing the DVD again and it worked! Fuckin' Hell!

Googled about the problem and found this discussion on MSDNER.NET about this very issue.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Upgrading to Team Foundation Server 2008

Starting today I will be working on upgrading to Team Foundation Server 2008 (TFS2008) from our current TFS2005 setup.

The current setup is TFS2005 180 day trial edition. This has been in production now for about 165 days and currently hosts 3 projects. It was implemented following my Teched 2007 expedition to Gold Coast in August. It has served us reliably as a source control, project management tool and work item management tool. Other features such as the Document Management feature running on Sharepoint Server frequently collapsed or locked documents for no apparent reason. This forced us to store documents in the source control leaving the Sharepoint features useless. Team Web Access was also put to good use.

Upgrading is a need as the trial version nears it's expiry.

TFS2008: What am I am looking forward to?

  • Build: In TFS2005 we had to cobble together a whole host of third party utilities for CI Builds, Scheduled Builds, etc.
  • Server Management: Managing users and roles was made easy (but not perfect) in TFS2005 using Power Toys for VS2005.

TFS2008: Licencing

I hate the way TFS2008 is licenced! I'd love to see some rationale from Microsoft as to why TFS2008 Standard edition isn't part of any of the MSDN Subscription packages. It's a product intricately linked to Visual Studio and yet the only version available for MSDN Subscribers is the Workgroup Edition limited to 5 users. I hope MS thinks harder about the licencing program for this product and gave the MSDN Subscribers some more options. For us I guess, the only way is to grab a fully licenced version sometime before the end of trial period.

Migration!

I will prepare the migration plan sometime tomorrow. The complication for us, is that we're upgrading to another server. Having read bits of different migration options, it'd be a challenge to migrate without any serious impact to the work item tracking and source controlled item history. I intend to document the experience here in as much detail as possible.

As with any Microsoft product, nothing is simple, so I am sure this won't be a walk in the park.

Currently rated 1.0 by 1 people

  • Currently 1/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Belkin Wireless G Router F5D7230-4 v7001 is crap!

I recently bought the above wireless router on way back home from Brisbane. It was part of a starter kit with a USB wireless adapter. Perfect for me to setup shared internet between the home PC and my laptop. My internet access is through a Kidanet 128K package. This is a PPPoE type setup with an Alvarion Breeze Max Pro modem connected to some sort of wireless antennae on the roof. The antennae has a direct line of site to the Kidanet transmitter.

The internet connection is good, except for it's frequent drops which forces me to reconnect. This is ok if modem is directly hooked to my PC or the laptop which is set to reconnect automatically and does so successfully. I have enabled the auto-reconnect option on the router as well.

It appears that the auto-reconnect feature may not be working on the router. Every so often the router just seems to stop working. This I guess is because the Kidanet internet connection drops and the router is unable to reconnect. I am still connected to the router either wirelessly or even a direct wired connection to one of the ports, however pinging the router just doesn't work. All the relevant lights (such as the internet, modem, wireless or the connected port) on the router remain lit, indicating that everything is normal. Everything is anything but normal. The only way out is restarting the modem.

Today I had some Kidanet support guys check the antennae  and the modem. The did some retuning and reconfiguring, and assured me that the internet connection wouldn't drop. I have yet to verify that, but I am guessing they're wrong. The problem with the router remains.

I don't know how the other routers work with Kidanet, but I hope they do without any of the problems I am facing. I reckon this Belkin wireless router is a piece of crap.

I hate wires, so I thought this kit would be the start of my very own wireless revolution at home. Instead it has all but proven the reliability of the wires.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Encrypt ConnectionStrings in App.config

Working on one of our windows forms projects recently, I needed to encrypt the database connection strings in the App.config file. With a few minutes of googling, I found exactly what I was looking for here on MSDN (http://msdn2.microsoft.com/en-us/library/89211k9b(VS.80).aspx).

The code that did the trick for me is as below:

 

static void ToggleConfigEncryption(string exeConfigName)
{
// Takes the executable file name without the
// .config extension.
try
{
// Open the configuration file and retrieve 
// the connectionStrings section.
Configuration config = ConfigurationManager.
OpenExeConfiguration(exeConfigName);
ConnectionStringsSection section =
config.GetSection("connectionStrings")
as ConnectionStringsSection;
if (section.SectionInformation.IsProtected)
{
// Remove encryption.
section.SectionInformation.UnprotectSection();
}
else
{
// Encrypt the section.
section.SectionInformation.ProtectSection(
"DataProtectionConfigurationProvider");
}
// Save the current configuration.
config.Save();
Console.WriteLine("Protected={0}",
section.SectionInformation.IsProtected);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}

 

I placed the code above in a console application and which requires just one parameter i.e. the application executable file name.

My console application, Encryptor, is available for download from here. To use it:

  1. Place Encryptor in the same directory as your application executable and the config file.
  2. Run Encryptor from the command line as:

                Encryptor <ApplicationExeFileName.exe>

As shown in the code above, Encryptor is a toggle application. That means, if you run it once, it will encrypt the connectionString and run it the second time and it will decrypt it.

That's it! Enjoy.

PS: If you want my Encryptor VS2005 Project, just put up a comment and I shall make arrangements ;-) 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Build Ticker prevents Windows XP from shutting down

If you use Team Foundation Server and Team System for development, you would have come across, Build Ticker, the handy tool which keeps you updated on all team builds. This is a great tool for TFS administrators.

There are a couple of snags though. First, because it runs in the background, it does consume a fair bit of memory, especially if you're trying to squeeze every bit of memory for whatever else you're doing.

Second; it will prevent you from shutting your system down. I kept getting the following warning logged in the event logs.

Source: USER32
EventID: 1073
Description: The attempt to reboot <yourComputerName> failed 

 

 I figured out after discovering that when the Build Ticker loads at system bootup, the options window for it load as well. It doesn't appear on the desktop unless you select it by the Alt-Tab method.

So now, before shutting down, I right click on the Build Ticker icon in the tray and click exit. System will happily power down after that. 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Outlook 2007 Performance Problems

I recently upgraded to Office 2007 and generally my experience in terms of performance was negative. It runs absolutely slow! The worst culprit of the lot was Outlook 2007.

Googling the issue thankfully worked and I located this brilliant site by Roundtrip Solutions with enough tips to resolve the problem. The tips listed are a long read and for me all I had to do was:

Shane Keller has offered the following general solution on the Microsoft Outlook Discussion forum, which has been refined through feedback by other users as they implement it:

STEP 1: Turn off Outlook 2007 and locate each of these files in turn and rename as indicated. For some reason, during the upgrade these four files can become corrupted - the migration from 2003 to 2007 isn’t the smoothest but not having to create all your POP3 accounts again is excellent.

1. extend.dat - you will find this file in the location | Drive Letter:\Documents and Settings\user-directory\Local Settings\Application Data\Microsoft\Outlook\extend.dat

//change it to extend.old

 

Long live Shane Keller!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5