In this blog post. Let us learn about how to retrieve date and time when the SQL Server was installed. To retrieve the SQL Server Installation date, we have to check the login “NT Authority\System” creation date which gets created at the time of SQL Server installation. You can check the SQL Server installation date and time by querying the sys.syslogins or sys.server_principals view against the login “NT Authority\System” name.
Check the SQL Server installation date and time using sys.server_principals view
SELECT @@SERVERNAME AS Server_Name, create_date AS SQL_Server_Install_Date FROM sys.server_principals WITH (NOLOCK) WHERE name = N'NT AUTHORITY\SYSTEM' OR name = N'NT AUTHORITY\NETWORK SERVICE';
Check the SQL Server installation date and time using sys.syslogins view
SELECT @@SERVERNAME AS [Server Name], createdate AS SQL_Server_Install_Date FROM sys.syslogins WHERE name = N'NT AUTHORITY\SYSTEM' OR name = N'NT AUTHORITY\NETWORK SERVICE';
Knowing the SQL Server Installation date can give you an idea how old the hardware you have been using to run the SQL Server instance.