I have been asked this question a number of times and my answer always has been “Search online and you will find the answer.” Every single time someone follows my answer, he finds the accurate answer in just a few clicks. However, this question is getting very popular nowadays, so I decided to answer this question through a blog post. Let us learn about how to retrieve SQL Server installation date time.
I usually prefer creating my own T-SQL script but in today’s case, I have taken the script from the Web. I have seen this script in so many places that I do not know who the original creator is, so I’m not sure who should get credit for the script.
Question: How do I retrieve SQL Server Installation date?
Answer: Run the following query and it will give you the date of SQL Server Installation.
SELECT create_date FROM sys.server_principals WHERE sid = 0x010100000000000512000000
Question: I have installed SQL Server Evaluation version. How do I know what is the expiry date for it?
Answer: SQL Server evaluation period lasts for 180 days. The expiration date is always 180 days from the initial installation. The following query will give the expiration date of evaluation version:
-- Evaluation Version Expire Date SELECT create_date AS InstallationDate, DATEADD(DD, 180, create_date) AS 'Expiry Date' FROM sys.server_principals WHERE sid = 0x010100000000000512000000 GO
I believe there is a way to do this using the registry, but I have not explored it personally. Now, as to what I’ve said earlier, there are many different blog posts on this subject. Let me list a few which I really enjoyed reading as they shared a few more insights about this subject:
Retrieving SQL Server 2012 Evaluation Period Expiry Date
How to find the Installation Date for an Evaluation Edition of SQL Server
Reference: Pinal Dave (https://blog.sqlauthority.com)
4 Comments. Leave new
Nice
Thanks.
Twice I have used this
Nice…! Could you please help me how to get Insatallation date of SQL server for list of servers (sqy 200+ servers) using Monitoring server?
I want to fire query on Monitor server & i should get result SQL server installation date with respect to Server Name.
If you don’t want to have to memorise a SID try …
SELECT create_date
FROM sys.server_principals
WHERE name = ‘NT AUTHORITY\SYSTEM’;