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

Rowset Columns
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.

Restriction Columns
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.
|

See Also