SQL SERVER 2016 – Find Expiry Date of Developer Edition

The title of the blog is little weird, but it was a question asked to me by a developer. Have you ever got such error messages which are strange yet difficult to comprehend? He told me that he has installed SQL Server 2016 developer edition from MSDN (which is free now): Download SQL SERVER 2016 Developer Edition for FREE

After installation, he contacted me and told that I am seeing the expiration date from below query. Why did this happen? What was the reason for this?

SELECT create_date AS 'SQL Server Installation Date'
	  ,DATEADD(dd, 180, create_date) AS 'SQL Instance will Stop Working ON'
FROM sys.server_principals
WHERE NAME = 'NT AUTHORITY\SYSTEM'

Do I need to activate it? – He had asked me over email. This was an interesting question.

Solarwinds

Above query is from the internet and even if you run on your server, you would get some expiry date. We need to keep in mind that this query is applicable ONLY and ONLY IF you are running an enterprise evaluation edition. So, here is the modified version of the query:

DECLARE @edition SQL_VARIANT
SELECT @edition = SERVERPROPERTY('Edition')
IF (@edition = 'Enterprise Evaluation Edition' OR @edition = 'Enterprise Evaluation Edition (64-bit)')
BEGIN
	SELECT  create_date AS 'SQL Server Installation Date'
		   ,DATEADD(dd, 180, create_date) AS 'SQL Instance will expire on'
	FROM sys.server_principals
	WHERE NAME = 'NT AUTHORITY\SYSTEM'
END
ELSE
BEGIN
	print 'You are running ' + convert(VARCHAR(100), 
             SERVERPROPERTY('Edition')) + ' which won''t expire' 
END

Here is the output:

SQL SERVER 2016 - Find Expiry Date of Developer Edition dev-expire-01

Have you encountered such situations? Did you install the wrong edition on your servers? Are you aware of such restrictions? Let me know. It was a great learning for me too.

Summary

You do not have to activate Developer Edition. It never expires. Expiry date query is not applicable for any edition other than evaluation.

SQL SERVER 2016 - Find Expiry Date of Developer Edition devliceses-800x323

Reference: Pinal Dave (https://blog.sqlauthority.com)

Solarwinds
, , ,
Previous Post
SQL SERVER 2016 – Getting Started with R Services and Forecasting – Notes from the Field #131
Next Post
SQL SERVER 2016 – Encrypt Your PII Data – Notes from the Field #132

Related Posts

11 Comments. Leave new

  • davidreynolds816
    December 10, 2016 2:39 am

    Very helpful, thank you.

    Reply
  • Bug fix: IF (@edition = ‘Enterprise Evaluation Edition’ OR @edition = ‘Enterprise Evaluation Edition (64-bit)’)
    Need to account for (64-bit).

    Reply
  • Hi Pinal, what about SQL Developer Edition on Linux? Will expire?

    Reply
  • Yes my 2017 Developer edition doesn’t start now.
    I don’t know what to do now, upgrade again to Dev Ed didn’t work.

    “`
    2018-02-01 15:42:27.78 Server Microsoft SQL Server 2017 (RC2) – 14.0.900.75 (X64)
    Jul 27 2017 08:53:49
    Copyright (C) 2017 Microsoft Corporation
    Developer Edition (64-bit) on Windows 10 Enterprise 10.0 (Build 15063: )

    2018-02-01 15:42:27.78 Server UTC adjustment: 1:00
    2018-02-01 15:42:27.78 Server (c) Microsoft Corporation.
    2018-02-01 15:42:27.78 Server All rights reserved.
    2018-02-01 15:42:27.78 Server Server process ID is 23700.
    2018-02-01 15:42:27.78 Server System Manufacturer: ‘Hewlett-Packard’, System Model: ‘HP ZBook 15’.
    2018-02-01 15:42:27.78 Server Authentication mode is MIXED.
    2018-02-01 15:42:27.78 Server Logging SQL Server messages in file ‘C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Log\ERRORLOG’.
    2018-02-01 15:42:27.78 Server The service account is ‘NT Service\MSSQLSERVER’. This is an informational message; no user action is required.
    2018-02-01 15:42:27.78 Server Registry startup parameters:
    -d C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\master.mdf
    -e C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Log\ERRORLOG
    -l C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\mastlog.ldf
    2018-02-01 15:42:27.78 Server Command Line Startup Parameters:
    -s “MSSQLSERVER”
    2018-02-01 15:42:27.78 Server Error: 17051, Severity: 16, State: 1.
    2018-02-01 15:42:27.78 Server SQL Server evaluation period has expired.
    2018-02-01 15:42:27.78 Server SQL Server shutdown has been initiated
    “`

    Reply
  • On Linux what shows as Developer edition from the query above shows up as an evaluation edition when running /opt/mssql/bin/sqlserver –help
    The response will give the number of days left or say that it has expired.
    Set your system date back in time (either turn off time sync or just unplug the network) and then re-run.
    This will then say x days left and show it is actually an evaluation,
    Hacking system tables to change various dates and certificates I have locked up SQL so currently performing a clean build and restoring backups….

    Reply
  • The work around if your edition has expired (for the purposes of performing a backup / database detatch) is to disconnect the netrowk, set the date back in time to when it worked, start up sql and then re-connect the network. The date will change back but sql will not shut down immediately and still allow remote connections in.

    Reply

Leave a Reply

Menu