Hi,
Using Tsql, how can I find out when MS SQL server was installed?
Thanks in advance
Hi,
Using Tsql, how can I find out when MS SQL server was installed?
Thanks in advance
The NT AUTHORITY\SYSTEM login is created when you install SQL Server, so:
SELECT createdate
FROM sys.syslogins
WHERE name = 'NT AUTHORITY\SYSTEM'
This will return an incorrect result however if you've ever restored the Master database.
It looks like the first 100 principal_id
values are reserved in sys.server_principals (SQL Server 2005+). Based on what I see in one of my sys.server_principals (SQL Server 2005, SP3), I'd try this:
SELECT MIN(create_date) FROM sys.server_principals WHERE principal_id > 100