SQL Instance Last restart date and time in SQL Server

197 views 20:09 0 Comments 29 September 2019

Introduction:

When your SQL instance was last restarted?

I understand it is very simple script but we often forget  simple scripts. Hence I thought to write this simple script and also we can use GUI to find the same. Both the ways I have described below.  Using GUI it is very easy and simple and additionally you will get some more information such as SQL edition, collation, number of databases including system.

Script:

-- ============================ --
-- Owner: SOYELUDDIN BISWAS     --
-- Created Date: 29/09/2019     --
-- Email: st.biswas99@gmail.com --
-- ============================ --

use master
go
select SERVERPROPERTY('ServerName') as Server
,sqlserver_start_time as [SQL instance last restarted date and time] from sys.dm_os_sys_info

Screen Shot:

SQL Instance last restart time
SQL Instance last restart time

Using GUI:

Step 1. Connect to SQL instance using SSMS.

Step 2. Right click on SQL instance –> Select Reports –> Standard Reports –> then click on Server Dashboard

Screen Shot:

SQL Instance last restart time
SQL Instance last restart time

Leave a Reply

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