We can find the SQL Server restart time using various methods. Below are the methods which I used to find out when was the SQL Server restarted.
SELECT sqlserver_start_time FROM sys.dm_os_sys_info;
(or) SELECT login_time FROM sys.dm_exec_sessions WHERE session_id = 1;
(or)SELECT start_time FROM sys.traces WHERE is_default = 1
(or)SELECT crdate FROM sysdatabases WHERE NAME = 'tempdb'
(or) SELECT create_date FROM sys.databases WHERE NAME = 'tempdb'
No comments:
Post a Comment