Migrating MS SQL 2k8 license from one machine to another

We have an old server with MS SQL 2008 on it that we want to move to a new server.  We would like to use the same license.  Originally, when the old server was sold to us we were given no documentation.  How do we dig up the license from the old server?  I'm assuming this is like MS Office where you get a key and just reinstall using the same key.  However, I can't seem to find the key...  Any advice on what to do in this situation?
LVL 6
Tim PhillipsWindows Systems AdministratorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RantCanSr. Systems AdministratorCommented:
Try magical jelly bean
 http://www.magicaljellybean.com/keyfinder/
There are a few other apps that will do the same. Belarc advisor is another one. You can install SQL in a 180 day trial mode while you get this sorted.
0
Tim PhillipsWindows Systems AdministratorAuthor Commented:
Just tried MJB and it didn't find anything and neither did Belarc.
0
RantCanSr. Systems AdministratorCommented:
Here is a list of 20 or so, with links,
http://pcsupport.about.com/od/productkeysactivation/tp/topkeyfinder.htm

And here is a small program some cat wrote to decode SQL 2008's key from the registry.
http://www.branchbits.com/blog/2010/01/sql-server-2008-product-key/
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tim PhillipsWindows Systems AdministratorAuthor Commented:
I tried a few of those and the "small program", but nothing worked.  Any other ideas?
0
RantCanSr. Systems AdministratorCommented:
I found this on:
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/87949b5a-21ae-49bc-b942-57ff64fe464c/how-to-find-out-existing-sql-product-key-and-replace?forum=sqlsetupandupgrade

Run the Powershell script below on your SQL server:

function Get-SQLserverKey {
    ## function to retrieve the license key of a SQL 2008 Server.
     param ($targets = ".")
    $hklm = 2147483650
    $regPath = "SOFTWARE\Microsoft\Microsoft SQL Server\100\Tools\Setup"
    $regValue1 = "DigitalProductId"
    $regValue2 = "PatchLevel"
    $regValue3 = "Edition"
    Foreach ($target in $targets) {
        $productKey = $null
        $win32os = $null
        $wmi = [WMIClass]"\\$target\root\default:stdRegProv"
        $data = $wmi.GetBinaryValue($hklm,$regPath,$regValue1)
        [string]$SQLver = $wmi.GetstringValue($hklm,$regPath,$regValue2).svalue
        [string]$SQLedition = $wmi.GetstringValue($hklm,$regPath,$regValue3).svalue
        $binArray = ($data.uValue)[52..66]
        $charsArray = "B","C","D","F","G","H","J","K","M","P","Q","R","T","V","W","X","Y","2","3","4","6","7","8","9"
        ## decrypt base24 encoded binary data
        For ($i = 24; $i -ge 0; $i--) {
            $k = 0
            For ($j = 14; $j -ge 0; $j--) {
                $k = $k * 256 -bxor $binArray[$j]
                $binArray[$j] = [math]::truncate($k / 24)
                $k = $k % 24
         }
            $productKey = $charsArray[$k] + $productKey
            If (($i % 5 -eq 0) -and ($i -ne 0)) {
                $productKey = "-" + $productKey
            }
        }
        $win32os = Get-WmiObject Win32_OperatingSystem -computer $target
        $obj = New-Object Object
        $obj | Add-Member Noteproperty Computer -value $target
        $obj | Add-Member Noteproperty OSCaption -value $win32os.Caption
        $obj | Add-Member Noteproperty OSArch -value $win32os.OSArchitecture
        $obj | Add-Member Noteproperty SQLver -value $SQLver
        $obj | Add-Member Noteproperty SQLedition -value $SQLedition
        $obj | Add-Member Noteproperty ProductKey -value $productkey
        $obj
    }
}
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Tim PhillipsWindows Systems AdministratorAuthor Commented:
Ended using the current version of SQL 2012 Express as it meets our needs.  The script wouldn't work for me.  Good try though.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.