码迷,mamicode.com
首页 > 数据库 > 详细

DBCC SQLPERF 用法

时间:2015-10-16 18:41:15      阅读:245      评论:0      收藏:0      [点我收藏+]

标签:

DBCC SQLPERF 有三种用途:Provides transaction log space usage statistics for all databases. In SQL Server it can also be used to reset wait and latch statistics。

Syntax

DBCC SQLPERF 
(     [ LOGSPACE ]
     |
          [ "sys.dm_os_latch_stats" , CLEAR ]
     |
     [ "sys.dm_os_wait_stats" , CLEAR ]
) 
     [WITH NO_INFOMSGS ]

 

Arguments
LOGSPACE

Returns the current size of the transaction log and the percentage of log space used for each database. You can use this information to monitor the amount of space used in a transaction log.

"sys.dm_os_latch_stats" , CLEAR

Resets the latch statistics. For more information, see sys.dm_os_latch_stats (Transact-SQL).

"sys.dm_os_wait_stats" , CLEAR

Resets the wait statistics. For more information, see sys.dm_os_wait_stats (Transact-SQL).

 

当DBCC SQLPERF用于清空Wait和Latch的统计信息时,是实例级的清空,这将导致该实例上所有DB的Wait和Latch统计信息都被Reset。

Resets the wait statistics for the instance of SQL Server.

DBCC SQLPERF("sys.dm_os_wait_stats",CLEAR);

 

DBCC SQLPERF 用法

标签:

原文地址:http://www.cnblogs.com/ljhdo/p/4885656.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!