Welcome to MSDN Blogs Sign in | Join | Help

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_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\90\MSSQLLicenseInfo\MSSQL9.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

 

Published Friday, November 10, 2006 6:44 PM by sqlblog

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Microsoft » Blog Archives » bugs, and sometimes it just surpasses understanding. >

# re: Tracking License Information in SQL 2005

Hello there,

your article is very helpful if I already have the License Mode information.  My question is how you would find the License Mode on a existing SQL 2005 server if you don't already know it.

Thanks.

-BJ

Thursday, April 19, 2007 10:24 AM by Bob Jones

# re: Tracking License Information in SQL 2005

Start SQL Server Enterprise Manager

Then SQL Server Group

Then RIGHT click on (local)

Check Properties

Wednesday, May 09, 2007 4:07 PM by Hello

# re: Tracking License Information in SQL 2005

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

Wednesday, June 13, 2007 8:47 AM by Mike P

# re: Tracking License Information in SQL 2005

Amazing imformation !! heads off to you !!

Wednesday, August 01, 2007 8:38 AM by Praveen Barath

# re: Tracking License Information in SQL 2005

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?

Friday, August 17, 2007 8:55 AM by Jim

# re: Tracking License Information in SQL 2005

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?

Friday, August 17, 2007 4:27 PM by jb

# re: Tracking License Information in SQL 2005

Too bad SQL 2005 uses SSMS not enterprise manager, so your explanation doesn't work.

Thursday, August 23, 2007 12:24 PM by Shawn

# re: Tracking License Information in SQL 2005

The info from 'Hello' above doesn't provide a complete picture (from SQL server management studio anyway). Whilst it tells you the edition installed, eg Standard or Enterprise and the number of processors on the box running the software , it doesn't tell you if the licensing mode is per-processor or per-user, or how many of whichever is active.

Monday, August 27, 2007 3:41 AM by Tam Kyle

# re: Tracking License Information in SQL 2005

I am trying to use this blog, but i did not found the following resgistry key on my server.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\90\MSSQLLicenseInfo\MSSQL9.00

Even if i manually created this , i cannot change the License Type...Please suggest

Thursday, August 30, 2007 7:02 AM by Sameer

# re: Tracking License Information in SQL 2005

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?

Tuesday, September 25, 2007 3:33 PM by dmg

# re: Tracking License Information in SQL 2005

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

Thursday, October 04, 2007 5:56 AM by vimal

# re: Tracking License Information in SQL 2005

Unfortunately creating those keys and value did not work in my case...the result is always "DISABLED".

Monday, October 15, 2007 7:58 AM by Stefano

# re: Tracking License Information in SQL 2005

Dito..

Same for me.. Can someone suggest a way around.

Monday, April 13, 2009 7:02 AM by Jay

# re: Tracking License Information in SQL 2005

It probably worked, maybe some typo in the regkey?

Thursday, July 09, 2009 8:07 AM by Dave

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker