What Version of SQL Server AM I Running?

I’m in the midst of a project using System Center Configuration Manager’s (SCCM) Desired Configuration Management (DCM) component. It has taken us some time to come up to speed on this, so our initial configuration checks were strictly against the Windows OS. Last week, we started working on the first SQL check—checking for service pack level. Initially, and for simplicity reasons, I wanted to avoid logging into to the database. So we put together the following PowerShell script.

 

 

 

 

It looked simple enough—we wrapped some version logic around it, and then tried to run it on a mass scale. It returned some of the following version numbers:

Version

—————-

10.3.5500.0

10.3.5500.0

10.50.1600.1

10.2.4000.0

10.50.1600.1

10.1.2531.0

10.50.1600.1

10.2.4000.0

10.51.2500.0

 

A few of those are actual legitimate build numbers, but most are not in the list at SQL Server Builds. This pattern is consistent in both the registry and the advanced properties of the SQL Server service in configuration manager. A connect item has been filed specifically about SP1 for 2008R2 doing this, but as the above data shows, it appears to be occur across multiple versions.

Additionally, I have a Premier support ticket open with Microsoft, but we haven’t had a solid response yet.

On Friday night after a glass of wine or two, I decided to see what would happen if I hacked the registry back to the “correct” version. I built a new VM using SQL 2008 R2 SP1—version is 10.50.2500, but shows as 10.51.2500. I did a global find and replace in the registry for 10.51 to 10.50, as well as replacing MinorVersion from 51 to 50. It worked in so far as PowerShell and SQL Config Mgr reported the proper version; however when I attempted to apply a CU to the instance, the installer broke. Don’t try this at home!

We can always log into the database and run select serverproperty(‘productversion’) and get the correct version—which SQL Server clearly isn’t getting from the operating system. This is a relatively minor issue, but I’m surprised it hasn’t risen to the surface more.

 

 

 

About jdanton1
A DBA, cyclist, cook (who likes to play chef occasionally)

3 Responses to What Version of SQL Server AM I Running?

  1. Chezak says:

    Hi im making list of our sql servers and i find same thing as you and on internet not many people are concerned about it 🙂

  2. Kristian Kaufmann says:

    Hi ! I noticed that I had the same issue in one of our customers servers and it showed out that the previous patch/sp was not correctly installed, I re-installed it and the applied the next patch successfully 🙂

  3. Q says:

    I thought .50 was the 32bit version, and .51 was the 64bit version.

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

%d bloggers like this: