DBCC SQLPERF(NETSTATS) 

Home
Up
What's New
DTS
SQL-DMO
SQL-NS
XP's
SQL Agent
Misc. Tools
Events
Articles
FAQ
Links
About...

DBCC SQLPERF(NETSTATS) returns statistics from the network layer inside SQL Server (also known as ODS).

The result set:

Statistic                         Value
-------------------------------- ------------------------
Network Reads                     45833.0
Network Writes                    80605.0
Network Bytes Read                1.438643E+8
Network Bytes Written             6.9211824E+7
Command Queue Length              0.0
Max Command Queue Length          0.0
Worker Threads                    0.0
Max Worker Threads                0.0
Network Threads                   0.0
Max Network Threads               0.0

Description of the statistic rows:

StatisticDescription
Network Reads 
Network Writes 
Network Bytes Read 
Network Bytes Written 
Command Queue LengthThis counter is always zero
Max Command Queue LengthThis counter is always zero
Worker ThreadsThis counter is always zero
Max Worker ThreadsThis counter is always zero
Network ThreadsThis counter is always zero
Max Network ThreadsThis counter is always zero

The table structure returned, has the following shape:

create table #netstats
(
    [Statistic]    nvarchar(32) not null,
    [Value]        float not null
)

To populate the table use:

insert into #netstats exec('dbcc sqlperf(netstats) with tableresults, no_infomsgs')
select * from #netstats

DBCC SQLPERF(NETSTATS, CLEAR) resets the statistics.

Questions or problems regarding this web site should be directed to Web Master.
Copyright © 1991-2005 SQLDev.Net. All rights reserved.
Last modified: 04/06/05.