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 focus on providing professional & effective solutions to help you find missing or retrieve product key for Microsoft SQL Server. Follow to find your Microsoft SQL Server product 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?

Yes, Microsoft SQL Server has a product key. However, it's not like the Windows operating system or Office applications, an SQL license key is embedded in the activation wizard of the software.

As a result, you actually can't directly find the license code in the admin center. So where do you find the SQL product key after installation?

Continue reading and we'll discuss this, making it easy for you to locate the license of SQL Server 2019/2017/2016 and even older versions.

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

Before starting the guide, we searched online and found that most solutions provided for finding Microsoft SQL Server product keys are described in an obscure manner.

Here, we collected 3 practical ways and make it clear for you to follow for retrieving SQL Server license:

#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 Finderenables all levels of Microsoft SQL Server users, Windows Server, and Windows users to simply find product keys of installed operating system, software, and programs in simple 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. View Applications Registry Keys on the right panel. Qiling Key Finder will show all keys of installed software. Copy the targeted serial numbers. Also, you can click "Print" or "Save".

You may be interested in Windows Server Backup:

AWS Server Backup: How to Backup A Windows Server?

Does your company need to backup all files, settings, applications, profiles for Windows Server 2019, 2016, 2012 (R2)? Read on to backup to AWS or local server.

server backup

#2. Use Registry to Find SQL Server Product Code

Free Solution to Find SQL Server Product Code

The Registry Editor on Windows Server computer also works to find the SQL Server product key for you. Be careful when you browse the Registry Editor with the following steps to locate SQL Server key value:

Note that the registry path may differ depends on different SQL Server versions.

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.Double-click the ProductCode value, then, you can view the SQL Server key.

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 works to retrieve the SQL Server product key from an existing installation on your client or Server machine. Mostly, this takes place when you have an old Server to move or relocate and no one remembers where your license is.

Here are the steps to find your SQL Server product key using PowerShell:

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

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

function GetSqlServerProductKey {
## 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
}
}

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

#2. For SQL Server 2014, replaceDigitalProductIDwith 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

After this, you'll see the product key of your SQL Server on the PowerShell window.

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

In many cases, finding the SQL Server product key is essential. On this page, we collected 3 reliable methods for you to follow and recover the missing product code for SQL Server.

Related Articles


Is this information helpful?     

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