DBCC SQLPERF can report log usage or reset cumulative wait and latch statistics. I separate reporting from resetting the baseline.

DBCC SQLPERF(LOGSPACE);
-- Administrator reset examples; do not execute just to inspect statistics:
-- DBCC SQLPERF('sys.dm_os_wait_stats', CLEAR);
-- DBCC SQLPERF('sys.dm_os_latch_stats', CLEAR);LOGSPACE reports each visible database’s log size and percentage used. It does not report the free disk space on the volume or explain why log reuse is being held. For the current database, sys.dm_db_log_space_usage is another read-only source.
The two CLEAR commands reset cumulative instance statistics without restarting SQL Server. Save the existing sample and coordinate with other monitoring before using them, because they discard the accumulated baseline. A before/after snapshot over a defined interval often answers the question without resetting everyone’s counters.
Locks coordinate transactional access; latches protect internal structures for short periods. Wait and latch counters summarize observed waits, not a complete record of every event. The original wait-statistics series and latches-versus-locks explanation remain linked for the broader context.
Reference: DBCC SQLPERF.
Related reading
- SQL SERVER – Wait Stats – Wait Types – Wait Queues – Day 0 of 28.
- What is the Difference Between Latches and Locks
A counter reset is not a diagnosis, it is the start of a new measurement interval.
Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.
Discover more from SQL Authority with Pinal Dave
Subscribe to get the latest posts sent to your email.





2 Comments. Leave new
Hi ,
In what situations we should clear these stats ?
sometimes you want to do a benchmarking without restarting SQL Service.