Monday, March 28, 2011

How to Check When SQL Server was installed?

NT AUTHORITY\SYSTEM login gets created when we install SQL Server. By querying sys.syslogins, we would get an idea of the SQL Server Installation date time as per the creation date time of NT AUTHORITY\SYSTEM.

SELECT createdate AS sql_server_install_date FROM sys.syslogins WHERE sid = 0x010100000000000512000000

SELECT * FROM sys.syslogins WHERE sid = 0x010100000000000512000000

[sourcecode language="sql"]
SELECT createdate AS sql_server_install_date FROM sys.syslogins WHERE sid = 0x010100000000000512000000

SELECT * FROM sys.syslogins WHERE sid = 0x010100000000000512000000

[/sourcecode]

No comments:

Post a Comment