Archive | February 2014

Failed Upgrade SQL Server 2008R2 to SQL Server 2012

So I recently had a fun experience attempting an in place upgrade from SQL Server 2008R2 to SQL Server 2012.

Scenario:

Virtualized server, took a copy and disabled the NIC so that I could do a test in-place upgrade without affecting anything.  The installer can’t find updates which is fine and gives no warnings about anything that will cause problems.

It goes through the whole process and everything is successful *except* for database services.  It complains because I have the default backup location set to a UNC, but since the NIC is disabled it can’t hit the UNC.

I try to repair, doesn’t do anything.  I try the upgrade process again but it won’t let me proceed because everything has already been done.  I try to uninstall from add/remove programs but that doesn’t work either.  The original error message said to run setup.exe /ACTION=uninstall  [bla bla bla], that didn’t work either.

That’s a lot of failed attempts… you want the actual solution don’t you!

Search your server for “Datastore_Discovery.xml” — find the most recent one [if you tried the upgrade process multiple times there will be a bunch of files].  Open the file and search for .Inactive.  Copy down each unique GUID corresponding to .Inactive nodes — you can ignore the child nodes as those will have the same GUID.

Now take that list and open up the command prompt and type:

msiexec /x {insert guid here}

Do that for each of the unique GUID’s that were in your list.

Once you are done run your setup.exe again but instead of going through the upgrade process right away, click on Tools -> Installed SQL Server Discovery Report.  If you see anything referencing Inactive, make sure you go back to the newest XML file and check for .Inactive again and repeat the msiexec /x {guid here} command.

If everything looks ok, proceed with the upgrade process again.  In my case, I made sure to change the default backup path on the databases in question first.

Hopefully this saves you some time!

Advertisements