Retrieving SQL Server 2012 Evaluation Period Expiry Date

SQL Server 2012 RTM Evaluation edition was made available on March 7, 2012. Some of us may have installed this on the date or later for evaluation, some of us may still be using the RC0 or an even an earlier version of SQL Server 2012. If you have SQL Server 2012 currently installed, have not purchased and installed the licensed key, the evaluation period may have expired or will be very soon. To avoid nasty surprises, it is a good idea to plan ahead and make a note of the expiry date of the evaluation period.

 

SQL Server 2012 Evaluation Period has expired

 

There are a number of ways to retrieve SQL Server 2012 Evaluation Period Expiry Date. In SQL Server 2012, the evaluation expiry date is not listed on the About dialog box of SQL Server Management Studio any more unlike previous versions.

 

SQL Server 2012 SSMS About Dailog Box

SQL Server Management Studio Dialog Box does not show Evaluation Expiry Date

 

The Evaluation period is 180 days, which we can calculate if we know the installation date. The three options of determining Evaluation Expiry Date are:

  • Running a simple T-SQL query
  • Inspecting Summary.txt in the installation log directory
  • Inspecting RegEdit configuration

 

Option 1: Running a simple T-SQL query

Run the following query to retrieve the installed and expiry date on an Evaluation edition of SQL Server 2012 instance.

SELECT
	create_date AS 'SQL Server Install Date',
	DATEADD(DD, 180, create_date) AS 'SQL Server Expiry Date'
FROM sys.server_principals
WHERE name = 'NT AUTHORITY\SYSTEM'

“NT AUTHORITY\SYSTEM” account on the database server is a Local System Account and by default gets created at the time of installation. Therefore we can rely on inspecting its creation date to safely determine the installation date of SQL Server.

See more definition of “NT AUTHORITY\SYSTEM” account here: http://msdn.microsoft.com/en-us/library/ms191543.aspx

Note: to check if you are running Evaluation edition, you can do this simply by checking the SQL Server database instance properties via SQL Server Management Studio (SSMS) as shown below.

SQL Server 2012 Database Server Properties

The following query will also return the Product Version, Product Level and Edition.

SELECT
	SERVERPROPERTY('ProductVersion') AS ProductVersion,
	SERVERPROPERTY('ProductLevel') AS ProductLevel,
	SERVERPROPERTY('Edition') AS Edition;
GO

 

Option 2: Inspecting Summary.txt

When SQL Server 2012 instance is installed, a Summary.txt file is created. This file is typically located at “C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\LOG\Summary.txt“.

Summary.txt contains important values pertaining to the instance installation, including the version being installed and when it is being installed. The Evaluation edition is valid for 180 days, so with simple arithmetic on the install date, we can determine the expiry date as exhibited below.

Summary.txt

In the above example, The install date is on 29 April 2012, so the expiry date is 26 October 2012 (180 days + 29 April 2012).

Option 3: Inspecting REGEDIT

  1. Open REGEDIT and navigate the following structure:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products
  2. Here you will see a long list of folders in form of a sequence of alphanumeric characters (GUID). Ensure the “Products” folder is highlighted/selected.
  3. From the Edit menu, click Find and type in “SQL Server 2012 Database Engine Services”. Clicking “Find Next” will open the [GUID] > InstallProperties folder which should look like this:

InstallProperties of SQL Server 2012 Database Engine Services

The InstallDate lists the date of installation in YYYYMMDD format, i.e. in this example, it is 29 April 2012. The expiry date for this instance is 180 days from the install date, which is 26 October 2012.

 

I hope this post has been useful for you. If there are other ways that you can think of, please don’t hesitate to let me know by leaving a comment.

 

Other related posts on SQL Server Evaluation Period Expiry Date:

Edit (June 4th, 2012):

On a side note, if you are using Evaluation edition for development purposes, it would be best to upgrade this instance to the Developer edition of SQL Server 2012. More information about the Developer edition and other license information on SQL Server 2012, please visit: http://www.microsoft.com/sqlserver/en/us/get-sql-server/how-to-buy.aspx

13 comments on “Retrieving SQL Server 2012 Evaluation Period Expiry Date
  1. You can also use the following query to see the number of days left in the evaluation:

    declare @daysleft int
    declare @instancename sysname
    select @instancename = CONVERT(sysname, SERVERPROPERTY(‘InstanceName’))
    exec @daysleft = xp_qv ’2715127595′, @instancename
    select @daysleft ‘Number of days left’
    GO

    Cheers!
    Jos

    • Thank you for the suggestion, Jos!

      In case readers are interested, I’ve found some comments from Gert Drapers years ago – which probably is still valid.

      xp_qv, hosted in xpsqlbot.dll is a wrapper around functionality in
      sqlboot.dll, which returns information about the SKU type, licensing etc
      It is not documented that is why you can not find a reference.

      I should be getting called very infrequently and as far as I know it only
      visits the Registry

      Julie

  2. Pingback: SQL SERVER – Retrieve SQL Server Installation Date Time « SQL Server Journey with SQL Authority

  3. Pingback: Upgrading from SQL Server 2012 Evaluation Edition | Ms SQL Girl

  4. Hi ,

    This post was very informative…nice one

    My sql server shows in SSMS:
    Product as Microsoft SQL Server Enterprise (64-bit)

    and when i check with below query shows 87 days left.
    want to confirm if this is evaluation or licensed version.

    ->Hkey local machine\..\installproperty\installsource
    shows as below
    Microsoft.SQL.Server.2012.Enterprise.Edition.with.Service.Pack.1-

    SELECT create_date AS ‘SQL Server Installed Date’,
    Expiry_date AS ‘SQL Server Expiry Date’,
    DATEDIFF(dd,create_date, GETDATE()) ‘No_of_Days_Used’,
    ABS(DATEDIFF(dd,expiry_date,GETDATE())) ‘No_Of_Days_Left’
    FROM
    (SELECT sp.create_date,
    DATEADD(dd, 180, sp.create_date) AS Expiry_date
    FROM sys.server_principals sp
    WHERE sp.name = ‘NT AUTHORITY\SYSTEM’) as exp_date_tbs

    a bit confused please help…

    • Hi Rino,

      Great question.

      To confirm if a SQL Server instance is an Evaluation edition or not, please run the following script:
      SELECT SERVERPROPERTY('Edition') AS Edition

      If it returns ‘Enterprise Evaluation Edition’, then you can run your SELECT script that you have provided earlier to retrieve the expiry date. If it returns anything other than ‘Enterprise Evaluation Edition’, it’s not an evaluation edition and does not expire.

      Further information on the SERVERPROPERTY function is detailed here: http://msdn.microsoft.com/en-us/library/ms174396.aspx

      Hope this helps.

      Julie

  5. Hi Julie
    Interesting, as non-SQL guy, can you tell me what happens to an Enterprise Evaluation edition when it expires? Will the core services and databases stop working?

    kindly advise

    • Hi Marco,

      It’s been a while since it has happened to me. From memory, SQL Server services would stop working. An error with the following message would show up in Event Viewer:

      SQL Server evaluation period has expired.
      Source: MSSQLSERVER

      Hope this helps. (Thanks for visiting my blog, by the way).

      Julie

        • Hi Portia,

          Yes, you can as long as you have a current valid SQL Server license key and the features you are using in the Evaluation instance are compatible with the license key version.

          For example, if you are using one or more Enterprise only features in the Evaluation instance, you would need to ensure you have an Enterprise license key.

          Hope this helps.

          Kind regards,
          Julie

Leave a Reply

Your email address will not be published. Required fields are marked *


three × = 9

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>