How to know when SQL Server was started?

Many times we want to know when SQL Server was last started.
For this here is a simple way

As we know tempdb always recreated when SQL Server starts , so from create_date of tempdb we can get idea when the server was started.

select create_date from sys.databases where name = 'tempdb'

No comments:

Post a Comment

Amazon Contextual Product Ads

Popular Posts