Commands and queries management
.show commands-and-queries
.show commands-and-queries returns a table with admin commands and queries that have reached a final state. These commands and queries are available for 30 days.
The information presented in the output of the command is similar to .show commands
and .show queries, however it essentially lets you join both result sets in a simple manner.
Syntax
.show commands-and-queries
Output
The output schema is as follows:
| ColumnName | ColumnType |
|---|---|
| ClientActivityId | string |
| CommandType | string |
| Text | string |
| Database | string |
| StartedOn | datetime |
| LastUpdatedOn | datetime |
| Duration | timespan |
| State | string |
| FailureReason | string |
| RootActivityId | guid |
| User | string |
| Application | string |
| Principal | string |
| ClientRequestProperties | dynamic |
| TotalCpu | timespan |
| MemoryPeak | long |
| CacheStatistics | dynamic |
| ScannedExtentsStatistics | dynamic |
| ResultSetStatistics | dynamic |
| WorkloadGroup | string |
Note
For queries, the value of CommandType is Query.