Differences

This shows you the differences between two versions of the page.

Link to this comparison view

control_sql_-_query_for_evaluation_days_left_on_sql [2019/01/27 11:29] (current)
Line 1: Line 1:
 +====== ​ ======
 +
 +
 +
 +===== Explanation of SQL =====
 +
 +
 +
 +A few of our customers are on a Evaluation version of SQL server, this query will allow you to see how many days left that SQL server has before the Evaluation version Expires.
 +
 +
 +
 +===== Risk of Data Corruption if Run Improperly =====
 +
 +**None**. This is a selection query and no data is modified in the running of it.
 +
 +
 +
 +===== SQL =====
 +
 +
 +
 +sp_configure 'show advanced options',​ 1;
 +
 +
 +
 +RECONFIGURE
 +
 +
 +
 +GO
 +
 +
 +
 +sp_configure 'Agent XPs', 1;
 +
 +
 +
 +RECONFIGURE
 +
 +
 +
 +GO
 +
 +
 +
 +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
 +
 +
 +
 +===== Screenshot =====
 +
 +
 +
 +Will look similar to this:
 +
 +
 +
 +{{::​numberofdaysleft.png?​nolink&​|}}
 +
 +
 +
 +===== Version Information =====
 +  * Entered : __5/20/2015 David Kingsbury__
 +  * Version : Will work on all Versions of SQL
 +
 +
 +