Home > DeveloperSection > Blogs > Retrieve SQL Server Installation Date Time

Retrieve SQL Server Installation Date Time


Database Database 
Ratings:
0 Comment(s)
 1837  View(s)
Rate this:

SQL SERVER – Retrieve SQL Server Installation Date Time

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


Don't want to miss updates? Please click the below button!

Follow MindStick