Many DBA's use evaluation edition for demos and they are always worried when this will expire.
So there are couple of tricks to find same.
1. Querying extended stored procedure called "xp_qv"
/******************************************/
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
/**********************************/
2. Querying sys.server_principals, On the basis of user NT AUTHORITY\SYSTEM
/**********************************/
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'
/**********************************/
3. Last but least , You can read registry "Installdate" to find install date and add 6 months to get exact date. But be careful about instance you are checking.
No comments:
Post a Comment