Whats my Product Key

I was moving one of my database servers to a new cloud, and I could not find the product key that I used to install the SQL Server install.  So I did some google action and found a bunch of folks that had little to no clue on how to get the real product code.  I found a dude named Laser on the gearbox software website, that is a genius, and this worked for both my 2008 and 2012 versions of SQL Server.

In the registry I navigated to the key:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\100\DTS\Setup] – DigitalProductID, for SQL Server 2012 it will be in the “110” entries, and it might not be actually under this entry, I found it several spots so if you don’t see it there look around a bit.

Now I did find the the 2012 tag was actually the actual 16 2-digit hex values I was looking for where the 2008 tag was 164 2-digit hex values.  In the case of the 164 code, you need to 53rd pair to 69th pair to get your 16 2-digit hex value.

Next you need to take that value and reverse the entry, so for example,

01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16 becomes:  16,15,14,13,12,11,10,09,08,07,06,05,04,03,02,01

Now remove the commas and take your 32 digit code and put it into a Radix 16 to 24 converter, I found a calculator to do it.

Lastly, for Microsoft codes you need to take your results and do one last conversion:

0 ==> B,  1 ==> C,  2 ==> D,  3 ==> F,  4 ==> G,  5 ==> H,  6 ==> J,  7 ==> K,  8 ==> M,

9 ==> P,  A ==> Q,  B ==> R,  C ==> T,  D ==> V,  E ==> W,  F ==> X,  G ==> Y,  H ==> 2,

I ==> 3,  J ==> 4,  K ==> 6,  L ==> 7,  M ==> 8,  N ==> 9

Yep, it sounds crazy, but it works!  To be totally honest, I have never worked with radix based number systems before, and I am not about to start, and honestly, I get freaked out by hex values in the registry, but those codes cost a lot of money, so if you are like me and either forget to write it down because that would be easy, or inherit a system that was installed by somebody that didn’t write it down, this might just save you!