<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; T-SQL Script to find the CD key from Registry</title>
	<atom:link href="http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Fri, 17 May 2013 15:26:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: nurarun271</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-432297</link>
		<dc:creator><![CDATA[nurarun271]]></dc:creator>
		<pubDate>Tue, 05 Mar 2013 17:06:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-432297</guid>
		<description><![CDATA[wat is d use of this?]]></description>
		<content:encoded><![CDATA[<p>wat is d use of this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #018 &#124; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-430052</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #018 &#124; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 02 Mar 2013 01:30:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-430052</guid>
		<description><![CDATA[[...] T-SQL Script to find the CD key from Registry A Quick script which can help you find the CD Key from the registry. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] T-SQL Script to find the CD key from Registry A Quick script which can help you find the CD Key from the registry. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt R</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-423539</link>
		<dc:creator><![CDATA[Matt R]]></dc:creator>
		<pubDate>Mon, 18 Feb 2013 19:21:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-423539</guid>
		<description><![CDATA[For SQL Server 2012:

USE MASTER
GO

EXEC XP_REGREAD &#039;HKEY_LOCAL_MACHINE&#039;,&#039;SOFTWARE\Microsoft\Microsoft SQL Server\110\Tools\Setup&#039;,&#039;ProductCode&#039;
GO]]></description>
		<content:encoded><![CDATA[<p>For SQL Server 2012:</p>
<p>USE MASTER<br />
GO</p>
<p>EXEC XP_REGREAD &#8216;HKEY_LOCAL_MACHINE&#8217;,'SOFTWARE\Microsoft\Microsoft SQL Server\110\Tools\Setup&#8217;,'ProductCode&#8217;<br />
GO</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rita</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-422235</link>
		<dc:creator><![CDATA[rita]]></dc:creator>
		<pubDate>Fri, 15 Feb 2013 20:16:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-422235</guid>
		<description><![CDATA[it is an awesome script! thank you ... it is working for 2008 , but what about 2012? i didchange the path to SOFTWARE\Microsoft\Microsoft SQL Server\110\Tools\Setup... didn&#039;t help , why?]]></description>
		<content:encoded><![CDATA[<p>it is an awesome script! thank you &#8230; it is working for 2008 , but what about 2012? i didchange the path to SOFTWARE\Microsoft\Microsoft SQL Server\110\Tools\Setup&#8230; didn&#8217;t help , why?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Victoria K</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-343207</link>
		<dc:creator><![CDATA[Victoria K]]></dc:creator>
		<pubDate>Wed, 12 Sep 2012 16:49:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-343207</guid>
		<description><![CDATA[Shami Qureshi - thank you, just it is not showing CD Key - all of my servers are showing same productCode and i know i used different CD Key for 2 out or 3. I need to find out if i used a correct key for one of the servers and not the key that was intended for a diffent server. anyway to do that?  Thanks :)]]></description>
		<content:encoded><![CDATA[<p>Shami Qureshi &#8211; thank you, just it is not showing CD Key &#8211; all of my servers are showing same productCode and i know i used different CD Key for 2 out or 3. I need to find out if i used a correct key for one of the servers and not the key that was intended for a diffent server. anyway to do that?  Thanks :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shami Qureshi</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-327087</link>
		<dc:creator><![CDATA[Shami Qureshi]]></dc:creator>
		<pubDate>Wed, 08 Aug 2012 12:03:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-327087</guid>
		<description><![CDATA[For Sql Server 2008 R2

USE MASTER
GO

EXEC XP_REGREAD &#039;HKEY_LOCAL_MACHINE&#039;,&#039;SOFTWARE\Microsoft\Microsoft SQL Server\100\BIDS\Setup&#039;,&#039;ProductCode&#039;
GO]]></description>
		<content:encoded><![CDATA[<p>For Sql Server 2008 R2</p>
<p>USE MASTER<br />
GO</p>
<p>EXEC XP_REGREAD &#8216;HKEY_LOCAL_MACHINE&#8217;,'SOFTWARE\Microsoft\Microsoft SQL Server\100\BIDS\Setup&#8217;,'ProductCode&#8217;<br />
GO</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kubilay</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-279746</link>
		<dc:creator><![CDATA[kubilay]]></dc:creator>
		<pubDate>Thu, 26 Apr 2012 09:40:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-279746</guid>
		<description><![CDATA[for those who needs to find key of 2005 instance may use the free software named ProduKey. it works well for me.
http://www.nirsoft.net/utils/product_cd_key_viewer.html

further info, please refer this question:
http://stackoverflow.com/a/10311209/705982]]></description>
		<content:encoded><![CDATA[<p>for those who needs to find key of 2005 instance may use the free software named ProduKey. it works well for me.<br />
<a href="http://www.nirsoft.net/utils/product_cd_key_viewer.html" rel="nofollow">http://www.nirsoft.net/utils/product_cd_key_viewer.html</a></p>
<p>further info, please refer this question:<br />
<a href="http://stackoverflow.com/a/10311209/705982" rel="nofollow">http://stackoverflow.com/a/10311209/705982</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sakinaka ka chhora</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-253229</link>
		<dc:creator><![CDATA[Sakinaka ka chhora]]></dc:creator>
		<pubDate>Thu, 16 Feb 2012 13:42:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-253229</guid>
		<description><![CDATA[Just checking]]></description>
		<content:encoded><![CDATA[<p>Just checking</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sharjeel</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-219439</link>
		<dc:creator><![CDATA[sharjeel]]></dc:creator>
		<pubDate>Fri, 16 Dec 2011 15:38:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-219439</guid>
		<description><![CDATA[how do i get the key from sql 2008 R2 install on windows plateform?
2005 query its not working for me.

giving following error

RegOpenKeyEx() returned error 2, &#039;The system cannot find the file specified.&#039;
Msg 22001, Level 1, State 0

(0 row(s) affected)]]></description>
		<content:encoded><![CDATA[<p>how do i get the key from sql 2008 R2 install on windows plateform?<br />
2005 query its not working for me.</p>
<p>giving following error</p>
<p>RegOpenKeyEx() returned error 2, &#8216;The system cannot find the file specified.&#8217;<br />
Msg 22001, Level 1, State 0</p>
<p>(0 row(s) affected)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-148015</link>
		<dc:creator><![CDATA[John]]></dc:creator>
		<pubDate>Wed, 13 Jul 2011 15:36:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-148015</guid>
		<description><![CDATA[I am running this on the server. This is a 64bit server...I don&#039;t know if that would have an affect on this script.]]></description>
		<content:encoded><![CDATA[<p>I am running this on the server. This is a 64bit server&#8230;I don&#8217;t know if that would have an affect on this script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patil</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-147881</link>
		<dc:creator><![CDATA[Patil]]></dc:creator>
		<pubDate>Wed, 13 Jul 2011 05:05:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-147881</guid>
		<description><![CDATA[Are you trying it on your local machine or you are connected to Server?
Even I tried on server but ran into errors...]]></description>
		<content:encoded><![CDATA[<p>Are you trying it on your local machine or you are connected to Server?<br />
Even I tried on server but ran into errors&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-147724</link>
		<dc:creator><![CDATA[John]]></dc:creator>
		<pubDate>Tue, 12 Jul 2011 15:53:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-147724</guid>
		<description><![CDATA[Thanks again, that link took care of the error. I apologize for my lack of knowledge, trying to figure out some basics here. If I execute the function with Get-SQLserverKey the object returns nothing. How do I get it do display the $productKey?]]></description>
		<content:encoded><![CDATA[<p>Thanks again, that link took care of the error. I apologize for my lack of knowledge, trying to figure out some basics here. If I execute the function with Get-SQLserverKey the object returns nothing. How do I get it do display the $productKey?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patil</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-147623</link>
		<dc:creator><![CDATA[Patil]]></dc:creator>
		<pubDate>Tue, 12 Jul 2011 05:06:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-147623</guid>
		<description><![CDATA[Check this snapshot:
http://images.cjb.net/fa268.png

 Source Link:
http://mspowershell.blogspot.com/2010/11/sql-server-product-key.html]]></description>
		<content:encoded><![CDATA[<p>Check this snapshot:<br />
<a href="http://images.cjb.net/fa268.png" rel="nofollow">http://images.cjb.net/fa268.png</a></p>
<p> Source Link:<br />
<a href="http://mspowershell.blogspot.com/2010/11/sql-server-product-key.html" rel="nofollow">http://mspowershell.blogspot.com/2010/11/sql-server-product-key.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-147521</link>
		<dc:creator><![CDATA[John]]></dc:creator>
		<pubDate>Mon, 11 Jul 2011 21:46:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-147521</guid>
		<description><![CDATA[Thanks for the script. I&#039;m very new to PowerShell and am having trouble running this. I changed all the funky double quotes to regular double quotes but cannot get past an error 
&quot;You must provide a value expression on the right-hand side of the &#039;-&#039; operator. 
At line:20 char:28  
+ For ($i = 24; $i -ge 0; $i-) &lt;&lt;&lt;&lt; {

I&#039;ve retyped some of the lines thinking a hidden char might be the issue, but to no avail. 

Thanks again!]]></description>
		<content:encoded><![CDATA[<p>Thanks for the script. I&#8217;m very new to PowerShell and am having trouble running this. I changed all the funky double quotes to regular double quotes but cannot get past an error<br />
&#8220;You must provide a value expression on the right-hand side of the &#8216;-&#8217; operator.<br />
At line:20 char:28<br />
+ For ($i = 24; $i -ge 0; $i-) &lt;&lt;&lt;&lt; {</p>
<p>I&#039;ve retyped some of the lines thinking a hidden char might be the issue, but to no avail. </p>
<p>Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emmanuel</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-144694</link>
		<dc:creator><![CDATA[Emmanuel]]></dc:creator>
		<pubDate>Wed, 29 Jun 2011 16:58:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-144694</guid>
		<description><![CDATA[Thanks so much, it teally helped me]]></description>
		<content:encoded><![CDATA[<p>Thanks so much, it teally helped me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patil</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-118453</link>
		<dc:creator><![CDATA[Patil]]></dc:creator>
		<pubDate>Mon, 14 Feb 2011 11:44:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-118453</guid>
		<description><![CDATA[Here is the power shell script to get CD key from SQL Server 2008 and R2 written by Jakob Bindslet, which I found while searching...

function Get-SQLserverKey {
    ## function to retrieve the license key of a SQL 2008 Server.
    ## by Jakob Bindslet (jakob@bindslet.dk)
    param ($targets = &quot;.&quot;)
    $hklm = 2147483650
    $regPath = &quot;SOFTWARE\Microsoft\Microsoft SQL Server\100\Tools\Setup&quot;
    $regValue1 = &quot;DigitalProductId&quot;
    $regValue2 = &quot;PatchLevel&quot;
    $regValue3 = &quot;Edition&quot;
    Foreach ($target in $targets) {
        $productKey = $null
        $win32os = $null
        $wmi = [WMIClass]&quot;\\$target\root\default:stdRegProv&quot;
        $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 = &quot;B&quot;,&quot;C&quot;,&quot;D&quot;,&quot;F&quot;,&quot;G&quot;,&quot;H&quot;,&quot;J&quot;,&quot;K&quot;,&quot;M&quot;,&quot;P&quot;,&quot;Q&quot;,&quot;R&quot;,&quot;T&quot;,&quot;V&quot;,&quot;W&quot;,&quot;X&quot;,&quot;Y&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;
        ## 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 = &quot;-&quot; + $productKey
            }
        }
        $win32os = Get-WmiObject Win32_OperatingSystem -computer $target
        $obj = New-Object Object
        $obj &#124; Add-Member Noteproperty Computer -value $target
        $obj &#124; Add-Member Noteproperty OSCaption -value $win32os.Caption
        $obj &#124; Add-Member Noteproperty OSArch -value $win32os.OSArchitecture
        $obj &#124; Add-Member Noteproperty SQLver -value $SQLver
        $obj &#124; Add-Member Noteproperty SQLedition -value $SQLedition
        $obj &#124; Add-Member Noteproperty ProductKey -value $productkey
        $obj
    }
}

Use the function to retrieve the Product Key from the local PC:

Get-SQLserverKey]]></description>
		<content:encoded><![CDATA[<p>Here is the power shell script to get CD key from SQL Server 2008 and R2 written by Jakob Bindslet, which I found while searching&#8230;</p>
<p>function Get-SQLserverKey {<br />
    ## function to retrieve the license key of a SQL 2008 Server.<br />
    ## by Jakob Bindslet (jakob@bindslet.dk)<br />
    param ($targets = &#8220;.&#8221;)<br />
    $hklm = 2147483650<br />
    $regPath = &#8220;SOFTWARE\Microsoft\Microsoft SQL Server\100\Tools\Setup&#8221;<br />
    $regValue1 = &#8220;DigitalProductId&#8221;<br />
    $regValue2 = &#8220;PatchLevel&#8221;<br />
    $regValue3 = &#8220;Edition&#8221;<br />
    Foreach ($target in $targets) {<br />
        $productKey = $null<br />
        $win32os = $null<br />
        $wmi = [WMIClass]&#8220;\\$target\root\default:stdRegProv&#8221;<br />
        $data = $wmi.GetBinaryValue($hklm,$regPath,$regValue1)<br />
        [string]$SQLver = $wmi.GetstringValue($hklm,$regPath,$regValue2).svalue<br />
        [string]$SQLedition = $wmi.GetstringValue($hklm,$regPath,$regValue3).svalue<br />
        $binArray = ($data.uValue)[52..66]<br />
        $charsArray = &#8220;B&#8221;,&#8221;C&#8221;,&#8221;D&#8221;,&#8221;F&#8221;,&#8221;G&#8221;,&#8221;H&#8221;,&#8221;J&#8221;,&#8221;K&#8221;,&#8221;M&#8221;,&#8221;P&#8221;,&#8221;Q&#8221;,&#8221;R&#8221;,&#8221;T&#8221;,&#8221;V&#8221;,&#8221;W&#8221;,&#8221;X&#8221;,&#8221;Y&#8221;,&#8221;2&#8243;,&#8221;3&#8243;,&#8221;4&#8243;,&#8221;6&#8243;,&#8221;7&#8243;,&#8221;8&#8243;,&#8221;9&#8243;<br />
        ## decrypt base24 encoded binary data<br />
        For ($i = 24; $i -ge 0; $i&#8211;) {<br />
            $k = 0<br />
            For ($j = 14; $j -ge 0; $j&#8211;) {<br />
                $k = $k * 256 -bxor $binArray[$j]<br />
                $binArray[$j] = [math]::truncate($k / 24)<br />
                $k = $k % 24<br />
         }<br />
            $productKey = $charsArray[$k] + $productKey<br />
            If (($i % 5 -eq 0) -and ($i -ne 0)) {<br />
                $productKey = &#8220;-&#8221; + $productKey<br />
            }<br />
        }<br />
        $win32os = Get-WmiObject Win32_OperatingSystem -computer $target<br />
        $obj = New-Object Object<br />
        $obj | Add-Member Noteproperty Computer -value $target<br />
        $obj | Add-Member Noteproperty OSCaption -value $win32os.Caption<br />
        $obj | Add-Member Noteproperty OSArch -value $win32os.OSArchitecture<br />
        $obj | Add-Member Noteproperty SQLver -value $SQLver<br />
        $obj | Add-Member Noteproperty SQLedition -value $SQLedition<br />
        $obj | Add-Member Noteproperty ProductKey -value $productkey<br />
        $obj<br />
    }<br />
}</p>
<p>Use the function to retrieve the Product Key from the local PC:</p>
<p>Get-SQLserverKey</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sqlOgzzy</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-65328</link>
		<dc:creator><![CDATA[sqlOgzzy]]></dc:creator>
		<pubDate>Fri, 16 Apr 2010 17:29:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-65328</guid>
		<description><![CDATA[exec xp_regread &#039;HKEY_LOCAL_MACHINE&#039;,&#039;SOFTWARE\Microsoft\Microsoft SQL Server\100\Tools\Setup&#039;,&#039;DigitalProductID&#039;
GO

2008 server has a different registry, I get a binary result. I am not sure if this is even the CD Key, I wasn&#039;t able to find the CD key for 2008.]]></description>
		<content:encoded><![CDATA[<p>exec xp_regread &#8216;HKEY_LOCAL_MACHINE&#8217;,'SOFTWARE\Microsoft\Microsoft SQL Server\100\Tools\Setup&#8217;,'DigitalProductID&#8217;<br />
GO</p>
<p>2008 server has a different registry, I get a binary result. I am not sure if this is even the CD Key, I wasn&#8217;t able to find the CD key for 2008.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ANilchow</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-62101</link>
		<dc:creator><![CDATA[ANilchow]]></dc:creator>
		<pubDate>Wed, 03 Mar 2010 19:56:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-62101</guid>
		<description><![CDATA[unfortunately This code piece z  not wotking my MS SQL 2005 /2008 versions.Any help ?

Error msg .
RegOpenKeyEx() returned error 2, &#039;The system cannot find the file specified.&#039;
Msg 22001, Level 1, State 1

(0 row(s) affected)]]></description>
		<content:encoded><![CDATA[<p>unfortunately This code piece z  not wotking my MS SQL 2005 /2008 versions.Any help ?</p>
<p>Error msg .<br />
RegOpenKeyEx() returned error 2, &#8216;The system cannot find the file specified.&#8217;<br />
Msg 22001, Level 1, State 1</p>
<p>(0 row(s) affected)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQLAuthority News - Best Articles on SQLAuthority.com Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-47182</link>
		<dc:creator><![CDATA[SQLAuthority News - Best Articles on SQLAuthority.com Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Tue, 24 Feb 2009 12:06:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-47182</guid>
		<description><![CDATA[[...] SQL SERVER - T-SQL Script to find the CD key from Registry [...]]]></description>
		<content:encoded><![CDATA[<p>[...] SQL SERVER &#8211; T-SQL Script to find the CD key from Registry [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aki</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-38643</link>
		<dc:creator><![CDATA[aki]]></dc:creator>
		<pubDate>Wed, 21 May 2008 11:10:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-38643</guid>
		<description><![CDATA[Hi 

Is there any way of reading the regstry &amp; getting to knw the SQL Server Instacnes on the particular box along with the version (2000 Or 2005)

Thanks]]></description>
		<content:encoded><![CDATA[<p>Hi </p>
<p>Is there any way of reading the regstry &amp; getting to knw the SQL Server Instacnes on the particular box along with the version (2000 Or 2005)</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kamlesh K Mishra</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-15515</link>
		<dc:creator><![CDATA[Kamlesh K Mishra]]></dc:creator>
		<pubDate>Wed, 17 Oct 2007 06:48:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-15515</guid>
		<description><![CDATA[CREATE PROC Reg_Get 
AS
BEGIN
	EXEC master.dbo.xp_regenumkeys &#039;HKEY_LOCAL_MACHINE&#039;,&#039;SOFTWARE\ISS\CPE&#039;
	IF @@ERROR  0
		BEGIN
			RAISERROR (&#039;Key doesnt exists &#039;,10,1 )
			RETURN 1
		END
	RETURN 0
END
GO
-- Calling Script
EXEC Reg_Get
-- Result 
Msg 22001, Level 16, State 1, Line 0
RegOpenKeyEx() returned error 2, &#039;The system cannot find the file specified.&#039;



I want to trap above error without using TRY..CATCH. So that It can support to SQL Server 2000 also]]></description>
		<content:encoded><![CDATA[<p>CREATE PROC Reg_Get<br />
AS<br />
BEGIN<br />
	EXEC master.dbo.xp_regenumkeys &#8216;HKEY_LOCAL_MACHINE&#8217;,'SOFTWARE\ISS\CPE&#8217;<br />
	IF @@ERROR  0<br />
		BEGIN<br />
			RAISERROR (&#8216;Key doesnt exists &#8216;,10,1 )<br />
			RETURN 1<br />
		END<br />
	RETURN 0<br />
END<br />
GO<br />
&#8211; Calling Script<br />
EXEC Reg_Get<br />
&#8211; Result<br />
Msg 22001, Level 16, State 1, Line 0<br />
RegOpenKeyEx() returned error 2, &#8216;The system cannot find the file specified.&#8217;</p>
<p>I want to trap above error without using TRY..CATCH. So that It can support to SQL Server 2000 also</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Praveen Barath</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-7114</link>
		<dc:creator><![CDATA[Praveen Barath]]></dc:creator>
		<pubDate>Wed, 08 Aug 2007 09:46:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-7114</guid>
		<description><![CDATA[What we can use for MSSQL 2005]]></description>
		<content:encoded><![CDATA[<p>What we can use for MSSQL 2005</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Praveen Barath</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-7016</link>
		<dc:creator><![CDATA[Praveen Barath]]></dc:creator>
		<pubDate>Tue, 07 Aug 2007 14:01:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-7016</guid>
		<description><![CDATA[Good one .....Mr Dave 
Can you explore some more Undocumented XP_ if possible plz send the link ..I will be great ful to u ...thanx or u can send on my mail ID ...i guess u have 

Thanx in advance!! chief]]></description>
		<content:encoded><![CDATA[<p>Good one &#8230;..Mr Dave<br />
Can you explore some more Undocumented XP_ if possible plz send the link ..I will be great ful to u &#8230;thanx or u can send on my mail ID &#8230;i guess u have </p>
<p>Thanx in advance!! chief</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hemanth Kelkar</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-6882</link>
		<dc:creator><![CDATA[Hemanth Kelkar]]></dc:creator>
		<pubDate>Mon, 06 Aug 2007 11:35:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-6882</guid>
		<description><![CDATA[This post is really useful. Thanks,

Also i need to know how to retrieve the Sql server Instance Name from the Registry.
I am using SQL Server2005 Express version.
Thanks]]></description>
		<content:encoded><![CDATA[<p>This post is really useful. Thanks,</p>
<p>Also i need to know how to retrieve the Sql server Instance Name from the Registry.<br />
I am using SQL Server2005 Express version.<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lee</title>
		<link>http://blog.sqlauthority.com/2007/02/28/sql-server-t-sql-script-to-find-the-cd-key-from-registry/#comment-5428</link>
		<dc:creator><![CDATA[Lee]]></dc:creator>
		<pubDate>Wed, 18 Jul 2007 19:28:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/02/28/how-to-find-the-sql-server-cd-key/#comment-5428</guid>
		<description><![CDATA[Thanks, I&#039;ve used this twice now.. 

BTW, when I cut and paste the code above, it uses &#8216; (acute quotes) instead of &apos; which messed me up briefly.]]></description>
		<content:encoded><![CDATA[<p>Thanks, I&#8217;ve used this twice now.. </p>
<p>BTW, when I cut and paste the code above, it uses &#8216; (acute quotes) instead of &apos; which messed me up briefly.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
