Differences
This shows you the differences between two versions of the page.
— |
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', | ||
+ | |||
+ | |||
+ | |||
+ | RECONFIGURE | ||
+ | |||
+ | |||
+ | |||
+ | GO | ||
+ | |||
+ | |||
+ | |||
+ | sp_configure 'Agent XPs', 1; | ||
+ | |||
+ | |||
+ | |||
+ | RECONFIGURE | ||
+ | |||
+ | |||
+ | |||
+ | GO | ||
+ | |||
+ | |||
+ | |||
+ | DECLARE @daysleft int | ||
+ | |||
+ | |||
+ | |||
+ | DECLARE @instancename sysname | ||
+ | |||
+ | |||
+ | |||
+ | SELECT @instancename = CONVERT(sysname, | ||
+ | |||
+ | |||
+ | |||
+ | EXEC @daysleft = xp_qv ' | ||
+ | |||
+ | |||
+ | |||
+ | SELECT @daysleft ' | ||
+ | |||
+ | |||
+ | |||
+ | GO | ||
+ | |||
+ | |||
+ | |||
+ | ===== Screenshot ===== | ||
+ | |||
+ | |||
+ | |||
+ | Will look similar to this: | ||
+ | |||
+ | |||
+ | |||
+ | {{:: | ||
+ | |||
+ | |||
+ | |||
+ | ===== Version Information ===== | ||
+ | * Entered : __5/20/2015 David Kingsbury__ | ||
+ | * Version : Will work on all Versions of SQL | ||
+ | |||
+ | |||
+ | |||