EnjoY | Database Research And Development: SQL Server: How to find a time when was SQL Server Restarted

Thursday, September 3, 2020

SQL Server: How to find a time when was SQL Server Restarted

 

   In this post, I am sharing few different scripts to find when was the SQL Server restarted.

The DBAs must know about this because they have to make sure about data consistency.

For example: when SQL Server restarted because of power failure, system failure, update failure or any other reason, We must check the last restarted time of SQL Server. Because from that time, we have to restore data from our backup disks to the actual disk.

When SQL Server restarted, few transactions also rollback. We have to also identify these transactions by knowing the correct time when SQL Server actually restarted.

Using sys.dm_exec_sessions:

Using sys.dm_os_sys_info:

Using sys.databases:

Using sys.traces:

Using sysdatabases:

No comments:

Post a Comment

It’s all about friendly conversation here at small review :) I’d love to be hear your thoughts!

Be sure to check back again because I do make every effort to reply to your comments here.

Featured Post

SQL Server : SELECT all columns to be good or bad in database system

This article is half-done without your Comment! *** Please share your thoughts via Comment *** In this post, I am going to write about one o...

Popular Posts