Thursday, 4 October 2012

How to reset stats in sys.dm_os_wait_stats view


One of main DMV's used in SQL Server for performance tuning is sys.dm_os_wait_statsthe view returns all the waits executed by a SQL server process.one of the main problem with the this DMV is all the data are cumulative since the last time the statistics were reset or the server was started, so whenever you want to analyse a performance issue its good to reset the counter in the DMV to 0 before you want baseline the performance.
 
Run the below TSQL to reset the counters in sys.dm_os_wait_stats,
 
DBCC SQLPERF ('sys.dm_os_wait_stats', CLEAR);
GO
 

4 comments:

  1. Very a lovely article I love it! keep sharing! Cost-Effective SEO Services

    ReplyDelete
  2. Technology can be frustrating. Finding someone you can trust to fix it should not be. Linkscreek Tech has been that trusted name in Lekki for over six years, serving hundreds of individuals and businesses with repairs, laptop sales, and hands-on IT support
    Hard drive replacement this is making Laptop battery for sale windows installation linkscreek tech linkscreek tech

    ReplyDelete