How to find last restart of Sql Server

Do you need to find the last restart time/date of your Sql Server, but only have access through Sql Server Management Studio?  Running the query below will tell you the last time the service has been restarted.

There is a view called “sys.dm_os_sys_info” which has this information (and a bunch of others) in a field called appropriately enough “sqlserver_start_time”.

To read more about this Dynamic Management View (DMV), please follow this link.

If we run the following query, we can see that my Sql Server service was last restarted on 2017-06-24 09:48:15.350.

Select sqlserver_start_time from sys.dm_os_sys_info




Next we restart the service.



Then we rerun the query and see that the time has changed.



There are other ways to find out this information if you have access to the server either physically or through RDP.  You can read the Sql Server Error log or look through the Windows Event viewer.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s