Click to Rate and Give Feedback
MSDN
MSDN Library
SQL Server
SQL Server 2008
Technical Reference
Schema Rowsets
 DISCOVER_COMMANDS
Community Content
In this section
Statistics Annotations (0)
Collapse All/Expand All Collapse All
SQL Server 2008 Books Online (October 2009)
DISCOVER_COMMANDS

Provides resource usage and activity information about the currently executing or last executed commands in the opened connections on the server.

The DISCOVER_COMMANDS rowset contains the following columns.

Column name Type indicator Length Description

COMMAND_CPU_TIME_MS

DBTYPE_I8

 

The CPU time, in milliseconds, consumed by the command since the start of the command execution.

COMMAND_ELAPSED_TIME_MS

DBTYPE_I8

 

The elapsed time, in milliseconds, since the start of the command.

COMMAND_READ_KB

DBTYPE_I8

 

The ccumulated value of data read from disk, in kilobytes, since the start of the command.

COMMAND_READS

DBTYPE_I8

 

The accumulated number of disk reads since the start of the command.

COMMAND_START_TIME

DBTYPE_DBTIMESTAMP

 

The date and time the last command started, expressed as UTC time on the server.

COMMAND_WRITE_KB

DBTYPE_I8

 

The accumulated value of data written to disk, in kilobytes, since the start of the command.

COMMAND_WRITES

DBTYPE_I8

 

The accumulated number of disk writes since the start of the command.

SESSION_COMMAND_COUNT

DBTYPE_I4

 

The number of commands executed since the start of the session.

SESSION_SPID

DBTYPE_I4

 

The session ID.

This schema rowset is not sorted.

The DISCOVER_COMMANDS rowset can be restricted on the columns listed in the following table.

Column name Type indicator Restriction State

SESSION_SPID

DBTYPE_I4

Optional.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker