Ads 720 x 90

When the SQL Server was restarted

Finding the last time when server was restarted

Here is some methods to find the last time the sql server /service was restarted.

Method 1
The first method uses the feature that, ‘tempdb’ will be recreated with every restart. So we need to check the created date (crdate) from master..sysdatabases.

SELECT crdate FROM master..sysdatabases WHERE name ='tempdb'
Method 2

In the second method, we check the master..sysprocesses database and check for the minimum value in the ‘login_time’ column.

SELECT MIN(login_time) FROM master..sysprocesses
Method 3

Refer ‘Event Viewer’ and check when the sql server service was started.

Related Posts

Total Pageviews

Subscribe Our Newsletter