Thursday, March 20, 2014

How to check when was SQL Server installed ?

I am using Evaluation edition for testing and writing blog. Evaluation Edition works for 180 days from the date of installation. Thus, it’s very import for me to know

  • When was my SQL Server Instance Installed
  • when it is going to stop working

Script to get this Information
SELECT create_date as 'SQL Server Install Date', 
DATEADD(dd,180,create_date) as 'Will Stop Working ON'
FROM sys.server_principals WHERE name='NT AUTHORITY\SYSTEM'
 
 
OUTPUT
How to check when was SQL Server installed ? How to check when were SQL Server Patches installed How to check when was SQL Server Services Pack installed


Logic, "NT AUTHORITY\SYSTEM", is SQL Server principal, which gets created during the installation. So we are just checking a creation date of that security principal.

 

No comments:

Post a Comment