3 Ways to Find Microsoft SQL Server Product Key in 2022 - Qiling  

3 Ways to Find Microsoft SQL Server Product Key [2022 Complete Guide]


This page offers professional and effective solutions to help you find or retrieve your Microsoft SQL Server product key. If you're looking for your Microsoft SQL Server product key, follow the steps to find it now.

PAGE CONTENT:
Does SQL Server Have a License Key?
How Do I Find My SQL Server Product Key? You Have 3 Ways Here for Help

Does SQL Server Have a License Key?

Microsoft SQL Server has a product key embedded in the activation wizard, unlike Windows or Office which have separate keys.

To find the SQL Server product key after installation, you can follow these steps:

To find the SQL Server license, go to the SQL Server installation directory, and then open the "SQL Server Licensing" document, which is usually found in the "SQL Server" folder. This document will provide information on the license type, such as Enterprise, Standard, or Developer edition, and the license terms.

How Do I Find My SQL Server Product Key? You Have 3 Ways Here for Help

We searched online and found that most solutions for finding Microsoft SQL Server product keys are described in an obscure manner, making it difficult to find a clear and straightforward answer.

Here are the 3 practical ways to retrieve SQL Server license in one paragraph:

#1. Use 1-Click SQL Server Product Key Finder
#2. Use Registry
#3. Use Powershell

Applies to:SQL Server 2019/2017/2016/2014/2012/2008 R2/2008/2003/2000, etc.

Your Quick Guide:

Now, let's get started finding SQL Server product keys in Windows Server computers.

#1. Use 1-click Microsoft SQL Server Product Key Finder - Qiling Key Finder

Find Microsoft SQL Server Product Key in 1-Click

Qiling Key Finder allows users of all levels to easily find product keys for installed operating systems, software, and programs with just a few clicks.

Besides finding SQL Server key, this software also works to:

How to Find Microsoft SQL Server Product Key:

Step 1. Click "Application" tab under "Registry Key".

Step 2. Qiling Key Finder displays all keys of installed software in the Applications Registry Keys panel on the right. You can copy the targeted serial numbers or click "Print" or "Save" to record them.

You may be interested in Windows Server Backup:

AWS Server Backup: How to Backup A Windows Server?

If your company needs to backup all files, settings, applications, and profiles for Windows Server 2019, 2016, or 2012 (R2), you've come to the right place. We can help you backup your data to either Amazon Web Services (AWS) or a local server, giving you peace of mind and protecting your business from potential data loss.

server backup

#2. Use Registry to Find SQL Server Product Code

Free Solution to Find SQL Server Product Code

The Registry Editor on a Windows Server computer can also be used to find the SQL Server product key. To locate the SQL Server key value using the Registry Editor, follow these steps with caution: browse the Registry Editor to find the SQL Server key value.

The registry path may vary depending on the SQL Server version, but it can be found in the registry under a path that starts with `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQLServer\Parameters` or `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQLServer\SQLServer`.

Step 1.Right-click the Windows icon and select "search".

Step 2.Typeregeditand hit Enter to open Registry Editor.

Step 3.Navigate to the path and find the ProductCode value:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\Setup

Step 4.To view the SQL Server key, double-click on the "ProductCode" value in the registry, which will allow you to view the key associated with SQL Server.

Find SQL Server product key in Registry

#3. Use Powershell to Get Back the SQL Server Product Key Information

Command Line Solution for Finding SQL Server Key

This method helps retrieve the SQL Server product key from an existing installation on your client or Server machine, often used when relocating an old Server and no one remembers the license location.

To find your SQL Server product key using PowerShell, you can use the following command: `Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL" | Select-Object -ExpandProperty 'MSSQLSERVER'`. This will return the instance name of your SQL Server.

Step 1.Right-click the Windows icon and select "PowerShell".

Step 2.Type the following command in PowerShell and hit Enter:

function GetSqlServerProductKey {
To retrieve the license key of a SQL 2008 Server, you can use the following function: `SELECT SERVERPROPERTY('ProductKey')`. This function returns the product key of the SQL Server instance, which is equivalent to the license key.
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
}
}

1. For SQL Server 2012, replace line 5 and 16 with the following line:

For SQL Server 2014, replace DigitalProductID with the real instance name in Registry and replace line 5 with the following line:

Step 3.TypeGetSqlServerProductKey and hit Enter.

Find SQL Server product key in PowerShell

I'm happy to help! However, I need a bit more context to assist you properly.

Finding SQL Server Product Key Is Possible, Pick the Easiest Way for Help Now

To recover a missing SQL Server product key, there are three reliable methods to follow. These methods can help you find the product code for SQL Server, which is often essential. By following these steps, you can successfully retrieve the product key and complete the SQL Server installation or activation process.

Related Articles


Is this information helpful?     

What can we do to improve this information? (Optional)
Refresh Please enter the verification code!