Sometimes you’ll need to retrieve your SQL Server Product Key from an existing installation on your Client or Server machine: the most common scenario takes place when you have an old Server to move or relocate and no one around you seem to remember where the license are… or if you’ve simply lost the Service Key post-it.

  1. Sql Server 2012 License Key
  2. How To Get The Sql Server 2014 Serial Key Code
  3. How To Use Sql Server

Sql Server 2012 License Key

Jan 21, 2013  For Sql Server 2008 R2. USE MASTER GO EXEC XP_REGREAD ‘HKEY_LOCAL_MACHINE’,'SOFTWARE Microsoft Microsoft SQL Server 100 BIDS Setup’,'ProductCode’ GO Other way around is search for product code in registry. The above query returns the productCode, but not the PID. Maqsood want to find out the PID to provide during the setup/upgrade. The script works with any SQL Server edition & version starting from 2005: SQL Server 2005, SQL Server 2008 and SQL Server 2008 R2.Pay close attention, though, if you’re using Sql Server 2012 or Sql Server 2014 you’ll have to make some small modifications to that code.

Run the Microsoft SQL Server setup program and the SQL Server Installation Center will be presented to you as shown below. Once in the SQL Server Installation Center, click on Maintenance, and then click select 'Edition Upgrade'. Take a look at a the image below. Jun 02, 2015  Get SQL Server Product Keys for Local and Remote Servers Using a string of servers, a text file, or Central Management Server to provide a list of servers, this script obtains the product key and versions for all installed instances on a server or cluster. Supports SQL Server 2005-2014. Use master GO exec xp_regread 'HKEY_LOCAL_MACHINE','SOFTWARE Microsoft Microsoft SQL Server 100 Tools Setup','DigitalProductID' GO And this is the source link. And here is the link that you can get the project and use it for converting serial number: Branch Bits – Finding SQL Server 2008 product key from an installed instance.

How To Get The Sql Server 2014 Serial Key Code

Luckily enough, you can easily get this information back thanks to this neat PowerShell script made by Jacob Bindslet:

2
4
6
8
10
12
14
16
18
20
22
24
26
28
30
32
34
36
38
40
## function to retrieve the license key of a SQL 2008 Server.
$hklm=2147483650
$regPath='SOFTWAREMicrosoftMicrosoft SQL Server100ToolsSetup'
$regValue2='PatchLevel'
Foreach($targetin$targets){
$win32os=$null
$wmi=[WMIClass]'$targetrootdefault:stdRegProv'
$data=$wmi.GetBinaryValue($hklm,$regPath,$regValue1)
[string]$SQLver=$wmi.GetstringValue($hklm,$regPath,$regValue2).svalue
[string]$SQLedition=$wmi.GetstringValue($hklm,$regPath,$regValue3).svalue
$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'
For($i=24;$i-ge0;$i--){
For($j=14;$j-ge0;$j--){
$binArray[$j]=[math]::truncate($k/24)
}
If(($i%5-eq0)-and($i-ne0)){
}
$win32os=Get-WmiObjectWin32_OperatingSystem-computer$target
$objAdd-MemberNoteproperty Computer-value$target
$objAdd-MemberNoteproperty OSCaption-value$win32os.Caption
$objAdd-MemberNoteproperty OSArch-value$win32os.OSArchitecture
$objAdd-MemberNoteproperty SQLedition-value$SQLedition
$objAdd-MemberNoteproperty ProductKey-value$productkey
}

The script works with any SQL Server edition & version starting from 2005: SQL Server 2005, SQL Server 2008 and SQL Server 2008 R2. Pay close attention, though, if you’re using Sql Server 2012 or Sql Server 2014 you’ll have to make some small modifications to that code.

For Sql Server 2012 you need to replace two lines of code. In details, replace line 5 with the following line:

$regPath='SOFTWAREMicrosoftMicrosoft SQL Server110ToolsSetup'

And also replace line 16 with the following line (thanks to gprkns for pointing it out):

You can also take a look of the complete script code for Sql Server 2012 at the following link.

For Sql Server 2014, Microsoft moved the DigitalProductID node to the actual instance name in the registry, so you will need to replace line 5 with something similar to the following (depending on your installation):

Wondershare Video Converter Crack Full. Wondershare Video Converter Ultimate Registration Code is a comprehensive application in our lineup. It lets you convert a variety that is wide of to almost any output format, find out more here. Enjoying your videos just got simpler. /wondershare-video-converter-serial-key-and-email.html. The complete blogger tutorials site for beginner Blogger.We also have an array of blogger tricks and tips.Along with blogger widgets, blogger templates and Blogger hacks.We also offer premium Blogger services and SEO optimization.

$regPath='SOFTWAREMicrosoftMicrosoft SQL ServerMSSQL12.[YOUR SQL INSTANCE NAME]Setup'

How To Use Sql Server

All you have to do in order to execute this script is to perform these actions:

  • Launch a PowerShellprompt (Start > Run, then type powershell and press ENTER.
  • Copy the above function text and past it directly inside the prompt area.
  • Press ENTER a couple times, just to be sure you’re back to the prompt.
  • Type GetSqlServerProductKey, then press ENTER.

If everything has been done like it should you’ll be able to see the following informations:

As you can see there’s a lot of stuff regarding your SQL Server installation, most of them you should know already, the latter being the Product Key.

That’s all for now: happy recover!

Coments are closed
Scroll to top