Find SQL Server Last Restart Time


 

Being as as DBA we always need to check the last SQL Server restart date and time. Below are few ways you can check when SQL Server was restarted last time.

Method 1
sp_readerrorlog 0,1,’Copyright (c)’

Find SQL Server Last Restart Time

Method 2
SELECT create_date FROM sys.databases WHERE name = ‘tempdb’

Find SQL Server Last Restart Time

(This query will not work if traceflag 3609 is ON which doesn’t create a new tempdb file during sql server startup.)

Method 3
SELECT sqlserver_start_time FROM sys.dm_os_sys_info

Find SQL Server Last Restart Time

Method 4
SELECT login_time FROM sys.dm_exec_sessions WHERE session_id = 1

Find SQL Server Last Restart Time

Method 5
Right click on the server name in SSMS and select Reports > Standard Reports > Server Dashboard
and you will get a report similar to below report.

Find SQL Server Last Restart Time


<<Click here to see all posts>>

If you found any of the information on this page helpful in anyway then please consider sharing this content with your favorite social network or by leaving your thoughts in the comment section. Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

Prove You Are Human Time limit is exhausted. Please reload CAPTCHA.