Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Tim Radney - Database Professional

Tim Radney - Database Professional by Tim Radney I am a Sr DBA for a top 40 US bank. I live in the south eastern US. I have been working with database since 1999 but only full time for the past three years.

SQL Server Installation Date

I have been working on a project recently to collect system metrics of a SQL Server environment. One of the items that came up that would like to collected is the date that SQL Server was installed on the server.  In doing a quick search on where this property would be located I found that sys.server_principals would hold the key. 

The principal “NT AUTHORITY\SYSTEM” should always have a sid of ’0×010100000000000512000000′ and its created_date would be when SQL Server was installed. 

Knowing this you can determine when SQL Server was installed using TSQL using the following script.

SELECT create_date
FROM sys.server_principals
WHERE sid = 0×010100000000000512000000

This works on SQL 2005 and above.

 

Share

Comments

Leave a comment on the original post [timradney.com, opens in a new window]

Loading comments...