SQL Server 2008R2各个版本,如何查看是否激活,剩余可用日期?

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



posted @ 2018-11-19 16:54  ddif  阅读(6227)  评论(0编辑  收藏  举报