Sql Server - how to get last server restart (DMV reset date/time)
dmv, sql-server, sql-server-2005, sql-server-2008
Solution
Using a prior question (different key words), I ended up using this approach. As always, up to the individual what would be 'best' for them!
SELECT create_date FROM sys.databases WHERE name = 'tempdb'
source: Find out how long the sql server service has been running, from t-sql
Problem
I'm using some modifications to Glenn Berry's excellent DMV queries! However, I would like to add to the resultset the 'last server restart', or to be more specific, the date/time the statistics for (all, the specific) DMV was reset. Since it would be quite important to know last reset when looking at the statistics, I want to make absolutely sure the date/time is accurate and shown. Question: How can you get the most accurate date/time of when a/all DMV statistic was reset? Thanks! -D