Generally we use the following commands to find out when SQL Server was restarted
SELECT create_date FROM sys.databases
WHERE database_id = 2 -- (TempDb)
SELECT start_time FROM sys.dm_exec_requests
WHERE (session_id = 1)
SELECT login_time FROM sys.sysprocesses
WHERE (spid = 1)
SELECT MIN(login_time) FROM sys.sysprocesses
From Now Onwards
SELECT sqlserver_start_time FROM sys.dm_os_sys_info
SELECT create_date FROM sys.databases
WHERE database_id = 2 -- (TempDb)
SELECT start_time FROM sys.dm_exec_requests
WHERE (session_id = 1)
SELECT login_time FROM sys.sysprocesses
WHERE (spid = 1)
SELECT MIN(login_time) FROM sys.sysprocesses
From Now Onwards
SELECT sqlserver_start_time FROM sys.dm_os_sys_info
No comments: