Wednesday, March 21, 2012

Reset data in DMVs

Is there a way to reset the data for some DMVs like the one for
waitstats,etc ?There are two documented, as per below. I guess you could try others, but yo
u would be in
undocumented land. There's no other way apart from DBCC SQLPERF to clear thi
s statistics, to the
best of my knowledge.
DBCC SQLPERF
(
[ LOGSPACE ]
|
[ 'sys.dm_os_latch_stats' , CLEAR ]
|
[ 'sys.dm_os_wait_stats' , CLEAR ]
)
[WITH NO_INFOMSGS ]
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Hassan" <Hassan@.hotmail.com> wrote in message news:eKNxrs1CHHA.3600@.TK2MSFTNGP06.phx.gbl...

> Is there a way to reset the data for some DMVs like the one for waitstats,
etc ?
>

No comments:

Post a Comment