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: | Statistic | Description | | Network Reads | | | Network Writes | | | Network Bytes Read | | | Network Bytes Written | | | Command Queue Length | This counter is always zero | | Max Command Queue Length | This counter is always zero | | Worker Threads | This counter is always zero | | Max Worker Threads | This counter is always zero | | Network Threads | This counter is always zero | | Max Network Threads | This 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. |