Freigeben über


Tracking License Information in SQL 2005

SQL 2005 no longer tracks licensing (per seat or per processor) via registry entries. SQL 2005 still reads the registry for this information, but the SQL 2005 setup doesn’t put licensing information in the registry during setup as in SQL 2000.

This is by-design. Hence, when ServerProperty(‘LicenseType’) is run on a SQL 2005 installation, ‘DISABLED’ is always returned.

This could be a problem for large companies who would like a programmatic way to track licensing rather than just having paper license tracking (which is the current method in SQL 2005).

Supported Resolution

Since SQL 2005 still queries the registry for licensing information, add the following key and values and ServerProperty(‘LicenseType’) will return license information.

Note: Licensing has always been server wide and not SQL instance specific. This setting would apply to all instances of SQL Server on the server.

HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL Server90MSSQLLicenseInfoMSSQL9.00

If you want to configure SQL Server for Per Processor then add these Registry Values under that Key adjusting for the number of processors you have a license for:

Name Type Value
Mode REG_DWORD 2           ß LICENSE_MODE_PERPROC
ConcurrentLimit REG_DWORD 4           ß Number of Processors

If you want to configure SQL Server for Per Seat licensing then add these Registry values under the Key adjusting for the number of seat license you have purchased.

Name Type Value
Mode REG_DWORD 0 ß LICENSE_MODE_PERSEAT
ConcurrentLimit REG_DWORD 100         ß No. of client licenses registered for SQL Server in Per Seat mode.

 

Test in SQL Management Studio

You need to stop and restart SQL Server 2005 before the information will be available to ServerProperty() as the registry is read on start-up of SQL Server. With the above settings you would see the following when you restart SQL Server 2005.

SELECT ServerProperty('LicenseType') as LicenseType, ServerProperty('NumLicenses') as ProcessorCount

 

Output:
LicenseType             ProcessorCount

PER_PROCESSOR 4

Posted By: Eric Burgess

Comments

  • Anonymous
    February 08, 2007
    PingBack from http://chaespot.com/mssql/2007/02/08/bugs-and-sometimes-it-just-surpasses-understanding/

  • Anonymous
    April 19, 2007
    The comment has been removed

  • Anonymous
    May 09, 2007
    Start SQL Server Enterprise Manager Then SQL Server Group Then RIGHT click on (local) Check Properties

  • Anonymous
    June 13, 2007
    We had installed SQl Server 2005 in trial mode. In the meantime we bought a license. How would we enter the license so the server sees it and is able to restart. Currently is down. Thanks

  • Anonymous
    August 01, 2007
    Amazing imformation !! heads off to you !!

  • Anonymous
    August 17, 2007
    I've checked the properties and can't find where it displays whether it is processor or cal based license.  Can you please direct me where to look?

  • Anonymous
    August 17, 2007
    I've look in the properties and can't find whether or not it is processor based or client based.  Can you detail how to find this information in the properties section?  Also, is there any way to query the information using Query ANalyzer or SQL-DMO/SQL-SMO?

  • Anonymous
    August 23, 2007
    Too bad SQL 2005 uses SSMS not enterprise manager, so your explanation doesn't work.

  • Anonymous
    August 26, 2007
    The comment has been removed

  • Anonymous
    August 29, 2007
    I am trying to use this blog, but i did not found the following resgistry key on my server. HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL Server90MSSQLLicenseInfoMSSQL9.00 Even if i manually created this , i cannot change the License Type...Please suggest

  • Anonymous
    September 25, 2007
    I have sql 2005 installed with server 2003, I need to install sql on another server using server 2000. How do get the license key with out having the cd?

  • Anonymous
    October 03, 2007
    i want to check wheter sql server 2005 is installed on my machine or not by checking its registry entry.so can u give me the exact registry entry for sql server 2k5 to be checked

  • Anonymous
    October 14, 2007
    Unfortunately creating those keys and value did not work in my case...the result is always "DISABLED".

  • Anonymous
    April 12, 2009
    Dito.. Same for me.. Can someone suggest a way around.

  • Anonymous
    July 09, 2009
    It probably worked, maybe some typo in the regkey?

  • Anonymous
    September 21, 2011
    To get or track License Information on SQL 2008 you can use the following path. HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL Server100MSSQLLicenseInfoMSSQL10.0 Registry name and values as mentioned above in this blog.      

  • Anonymous
    January 08, 2012
    Hi, I've tried as Aamer said but still get DISABLED. B.T.W. SQL 2008 R2 64 Bit STD Here's what I did. created key MSSQLLicenseInfo inside HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL Server100 as it didn't exist (?should it already be there) created key MSSQL10.0 inside HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL Server100MSSQLLicenseInfo as it didn't exist (?should it already be there) Created keys inside HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL Server100MSSQLLicenseInfoMSSQL10.0 Mode                      REG_DWORD            2 ConcurrentLimit        REG_DWORD            1 run the  query as above SELECT  ServerProperty('LicenseType') as LicenseType, ServerProperty('NumLicenses') as ProcessorCount DISABLED    Null Cheers in advance

  • Anonymous
    February 20, 2013
    I tried this on SQL Server 2012 and it works... HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL Server110MSSQLLicenseInfoMSSQL11.0 Just remember to restart the SQL Server service prior to running the query.

  • Anonymous
    August 12, 2014
    Hi! Does anyone have a solution for this now? I did not find any registry in the server. I have been checking other solutions for this but still unable to see my license details. Can anyone help me provide a solution? Thanks in advance.

  • Anonymous
    May 09, 2015
    good