http://www.sqlservercentral.com/blogs/sqlmanofmystery/2010/02/16/quick-tip-of-the-day/

Printed 2014/04/19 05:24AM

Quick Tip Of The Day

By Wesley Brown, 2010/02/16

Over and over again we are told that the DMV’s only hold data since your last reboot. So, how do you know when your server was last rebooted? Well, every time your SQL Server service restarts tempdb is recreated every time. With a quick query to sys.databases we can get the creation date of tempdb! Armed with that little nugget you can then analyze what is in the DMV’s relevant to the last system restart.

SELECT 
    create_date AS last_restart_time
   FROM   
    sys.databases
   WHERE  name = 'tempdb'

Copyright © 2002-2014 Simple Talk Publishing. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.