SQL 2008 upgrade to SQL 2012

Background

Our SQL 2012 project started with getting a sandbox VM configured. Installing SQL 2008 and subsequently upgrading the instance to SQL 2012. Went swimmingly. No real issues.

The First Upgrade
We scheduled the upgrade of our development instance for April 23, 2014. I kicked off the installer at 4:01pm ET on 4/23/2014. At approximately 4:45, I was presented with this error:

Error1

TEXT: The folder ‘’ does not exist. The folder is expected to exist to set permission on it. Examine why the folder does not exist and recreate it.

Quick aside: The error message is pretty specific and anybody that takes the time to read it would know what the problem is. This is really all you want from an error message, so kudos to Microsoft for this portion of it.

Before clicking OK, I went out to my drive to look at my directory structure. Turns out, there must have been some issue when I first installed this instance because the directory structure looked like this:
F:\MSSQL10.SQLDEV\MSSQL\Data\
–This contained all of my databases

F:\MSSQL10.SQLDEV\MSSQL\Data\MSSQL10.SQLDEV\MSSQL\DATA
–This had just been created in the last few minutes

F:\MSSQL10.SQLDEV\MSSQL\Data\MSSQL10.SQLDEV\MSSQL\DATA.OFF
F:\MSSQL10.SQLDEV\MSSQL\Data\MSSQL10.SQLDEV\MSSQL\JOBS.OFF
F:\MSSQL10.SQLDEV\MSSQL\Data\MSSQL10.SQLDEV\MSSQL\LOG.OFF
–These were empty and apparently created during the installation, but I then reconfigured SQL to not use them. Or, so I thought 

So, I renamed the ‘jobs.off’ and ‘log.off’ directories to remove the ‘.off’ portion. Easy enough. I find it really interesting that the installer created its own Data directory, but wouldn’t do that for the JOBS directory.

I then clicked on OK in the error dialog hoping the installer would retry the operation and continue. No dice on that.

About 2 minutes after clicking OK, the upgrade process finished with this lovely dialog.

DEV_image2

There is nothing quite like seeing RED on your summary screen. Summary is basically saying that everything worked, except for the database engine. You know, the most important part. The heart of everything. That part failed, but hey…your tools will work.

I also received a message that the computer needed to be restarted. So, of course, whenever there is an error first step is to reboot. So, I did that.

After the reboot, I ran the SQL 2012 setup.exe again (right-click, run as Administrator). Went through all of the beginning dialogs without an issue, setup rules, checks, product key, blah, blah, blah. When I got to the ‘select instance’ page, it correctly listed the SQL 2008 instances as well as both the SQL 2008 and 2012 versions of the shared components.

DEV_image3

I chose our DEV instance to upgrade and clicked Next and was moved to the ‘select features’ screen.

DEV_image4

The instance was pre-selected and I couldn’t click or unclick anything, so I just clicked next of course and was given this error.

DEV_image5

TAG: There are validation errors on this page. Click OK to close this dialog box. Review errors at the bottom of the setup page, then provide valid parameters or click Help for more information.

At the bottom of the screen is “there are no features selected for upgrade.”

What do you mean there are no features selected for upgrade? The instance is selected right on the same screen!

This was the time I started spinning my wheels for probably 30-45 minutes. A lot of looking at things on the server, rebooting the server and Googling everything I could think of.

I found a lot of blogs that spoke about this ‘no feature selected’ error, but their ‘select feature’ dialog didn’t list their instance properly. This was not my situation.

I also found a number of blogs that indicated I needed to uninstall my instance. This was not going to happen as my DEV instance was still fine – it was still SQL 2008 and was functional.

Of course, throughout this, I had reviewed my logs in the C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log directories. I finally found the big clue in the file “Summary_A2SQLDEV01_20140423_171837_GlobalRules.txt”. Here is one section of the file (I removed a couple columns for readability sake):

Product features discovered:

Product Instance Instance ID Feature
SQL Server 2008 sqldev mssql10.sqldev Database Engine Services
SQL Server 2008 sqltest mssql10.sqltest Database Engine Services
SQL Server 2008 Management Tools – Basic
SQL Server 2008 Management Tools – Complete
SQL Server 2008 Integration Services
SQL Server 2012 sqldev.inactive mssql11.sqldev Database Engine Services
SQL Server 2012 Management Tools – Basic
SQL Server 2012 Management Tools – Complete
SQL Server 2012 Integration Services

The clue is that there is a SQL 2008 “SQLDEV” instance as well as a SQL 2012 “SQLDEV.inactive” instance. What the heck? I thought it was upgrading my instance, not creating a new ‘inactive’ one? But, OK. hmmm.

At least I had a new keyword to Google with. I read a few more things and developed a strategy to remove the ‘inactive’ or ‘orphaned’ instance.

First, determine the ProductCode (GUID) of this inactive instance, then uninstall it from the command line and then retry the upgrade.

Determine product code:
In the log directories for the most recent failed attempt, I went to the Datastore directory and found the file “Datastore_Discovery.xml”. I opened this and searched for the keyword ‘inactive’. Found it. I then located the product code in the same section of the XML file.

Uninstall:
Now that I had the ProductCode, I should be OK to uninstall it. But, being the cautious person that I am, I wanted to verify that this ProductCode was actually for SQL 2012 installation (and NOT either of my functional SQL 2008 instances), so I opened regedit and searched for 19B2A97C-02C3-4AC7-BE72-A823E0BC895A. I only found one occurance of it and it was specifically for SQL 2012, so I was confident.

I opened a command line and executed “msiexec /x {19B2A97C-02C3-4AC7-BE72-A823E0BC895A}.

This brought up a very generic and ominous “are you sure you want to uninstall this product” dialog (it does not indicate what the product is). After clicking yes or OK, a SQL 2012 screen appeared and within a minute it was completed.

Things looked clean.

I restarted the installer from scratch. Went impatiently though all of the screens waiting to get to the feature selection. When I got there and clicked next, the dialog moved to the instance configuration screen! Success. I clicked though the rest of the prompts and started the upgrade. After a short 7 minutes, I got this beautiful message.

DEV_image6

I rebooted the server and then started the installation of CU8. It was slow, but was progressing. After about 10 minutes, my remote desktop session disconnected and wouldn’t reconnect. I tried pinging my DEV server with no reply. VM had crashed? In the middle of the upgrade? How in the world would SQL Server installer handle this? My evening was shot.

I contacted our support guys and shortly after my pings started getting answered, I got the ‘OK , try again’ email. As I logged back in, I didn’t know what I’d find in terms of a broken instance. But I was greeted with the wonderful “upgrade progress” dialog. The session had continued to run the entire time I couldn’t get to it. The VM had not crashed, the problem was just with my communicated with the VM. Phew!

Another 15 minutes of waiting before I got this:

DEV_image7

Done!!!

 

 

Tags: SQL 2008 2012 UPGRADE INSTALLATION ERROR FEATURE FOLDER DIRECTORY

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s