Problem

About 6 weeks ago I set about upgrading a few neglected dev servers to MOSS SP2, the process completed but reported errors similar to the following:

Event Type:    Error
Event Source:    SharePoint Products and Technologies Configuration Wizard
Event Category:    None
Event ID:    104
Date:        8/10/2009
Time:        1:49:23 PM
User:        N/A
Computer:    MYSERVERNAME
Description:
Failed to initiate the upgrade sequence.
Failed to upgrade SharePoint Products and Technologies.  Further information regarding this failure can be found at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS\Upgrade.log.
An exception of type System.ArgumentNullException was thrown.  Additional exception information: Value cannot be null.
Parameter name: connectionString
System.ArgumentNullException: Value cannot be null.
Parameter name: connectionString
   at Microsoft.SharePoint.Portal.Topology.SqlConnectionString..ctor(String connectionString)
   at Microsoft.SharePoint.Portal.Upgrade.Utility.GetV2ConfigurationDatabaseConnectionString()
   at Microsoft.SharePoint.Portal.Upgrade.FarmSequence.get_CanUpgrade()
   at Microsoft.SharePoint.Upgrade.SPManager.CanUpgrade(Object o)
   at Microsoft.SharePoint.Administration.SPPersistedUpgradableObject.get_CanUpgrade()
   at Microsoft.SharePoint.Upgrade.SPManager.ReflexiveCanUpgrade(Object o)
   at Microsoft.SharePoint.Upgrade.SPManager.NeedsUpgrade(Object o, Boolean bRecurse)
   at Microsoft.SharePoint.Administration.SPPersistedUpgradableObject.get_NeedsUpgrade()
   at Microsoft.SharePoint.Upgrade.SPManager.Initialize()
   at Microsoft.SharePoint.PostSetupConfiguration.UpgradeBootstrapTask.Run()
   at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()

Also, in the upgrade log file I found:

[SPManager] [DEBUG] [8/10/2009 1:49:18 PM]: Using cached [SPConfigurationDatabase Name=SharePoint_Config Parent=SPDatabaseServiceInstance] NeedsUpgrade value: False.
[FarmSequence] [DEBUG] [8/10/2009 1:49:19 PM]: Check to see if this is the child farm and the master has already been upgraded
[SPManager] [ERROR] [8/10/2009 1:49:19 PM]: CanUpgrade [SPFarm Name=SharePoint_Config] failed.
[SPManager] [ERROR] [8/10/2009 1:49:20 PM]: Value cannot be null.
Parameter name: connectionString
[SPManager] [ERROR] [8/10/2009 1:49:20 PM]:    at Microsoft.SharePoint.Portal.Topology.SqlConnectionString..ctor(String connectionString)
   at Microsoft.SharePoint.Portal.Upgrade.Utility.GetV2ConfigurationDatabaseConnectionString()
   at Microsoft.SharePoint.Portal.Upgrade.FarmSequence.get_CanUpgrade()
   at Microsoft.SharePoint.Upgrade.SPManager.CanUpgrade(Object o)
[SPManager] [ERROR] [8/10/2009 1:49:20 PM]: SPManager.Initialize failed.
[SPManager] [ERROR] [8/10/2009 1:49:21 PM]: Value cannot be null.
Parameter name: connectionString
[SPManager] [ERROR] [8/10/2009 1:49:21 PM]:    at Microsoft.SharePoint.Portal.Topology.SqlConnectionString..ctor(String connectionString)
   at Microsoft.SharePoint.Portal.Upgrade.Utility.GetV2ConfigurationDatabaseConnectionString()
   at Microsoft.SharePoint.Portal.Upgrade.FarmSequence.get_CanUpgrade()
   at Microsoft.SharePoint.Upgrade.SPManager.CanUpgrade(Object o)

At the time I tried Googling the problem but never really got anywhere, it wasn’t important so I set it aside. It’s been annoying me ever since so today I decided to get to the bottom of it.

Solution

The registry holds the connection string information for the configuration database under:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Secure\ConfigDB in a string value called dsn

If you check this out you’ll see that it all looks correct. (BTW, messing with the registry can seriously ruin your evening, blah blah, standard disclaimer).

However, there is another key at:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\Secure\ConfigDb

After some research, it seems that this key was used by WSS 2.0 to store the connection string for the configuration database so you’d be forgiven for thinking that it was ok that there was no value in here. Unfortunately some examination with RegMon reveals a different story!

In order to resolve the issue described, take the following steps:

  1. Create a new string value called dsn under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\Secure\ConfigDb key
  2. Copy the value of the dsn node from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Secure\ConfigDB into this new value
  3. Spark up a command prompt and type: psconfig -cmd upgrade -inplace b2b -wait –force
  4. Job done - as Hannibal famously said, “ I love it when a plan comes together”