DISCOVER_CONNECTIONS

Provides resource usage and activity information about the currently opened connections on the server.

Rowset Columns

The DISCOVER_CONNECTIONS rowset contains the following columns.

Column name

Type indicator

Length

Description

CONNECTION_BYTES_RECEIVED

DBTYPE_I8

 

The accumulated number of bytes received by the connection since the start of the connection.

CONNECTION_BYTES_SENT

DBTYPE_I8

 

The accumulated number of bytes sent by the connection since the start of the connection.

CONNECTION_DATA_BYTES_RECEIVED

DBTYPE_I8

 

The accumulated number of data bytes received by the connection since the start of the connection.

Data travels compressed within the connection; this value represents the expanded data received.

CONNECTION_DATA_BYTES_SENT

DBTYPE_I8

 

The accumulated number of data bytes sent by the connection since the start of the connection.

Data travels compressed within the connection; this value represents the expanded data sent.

CONNECTION_ELAPSED_TIME_MS

DBTYPE_I8

 

Elapsed time, in milliseconds, since the start of the connection.

CONNECTION_HOST_APPLICATION

DBTYPE_WSTR

 

The name of the application that initiated the connection.

CONNECTION_HOST_NAME

DBTYPE_WSTR

 

The name of the machine that initiated the connection.

CONNECTION_ID

DBTYPE_I4

 

A unique number that identifies the connection.

CONNECTION_IDLE_TIME_MS

DBTYPE_I8

 

The idle time, in milliseconds, since the start of the connection.

CONNECTION_IMPERSONATED_USER_NAME

DBTYPE_WSTR

 

Reserved for future use.

CONNECTION_LAST_COMMAND_ELAPSED_TIME_MS

DBTYPE_I8

 

The elapsed time, in milliseconds, since the end of the last command executed.

CONNECTION_LAST_COMMAND_END_TIME

DBTYPE_DBTIMESTAMP

 

The server UTC date and time when the last command finished its execution.

CONNECTION_LAST_COMMAND_START_TIME

DBTYPE_DBTIMESTAMP

 

The server UTC date and time when the last command initiated its execution.

CONNECTION_START_TIME

DBTYPE_DBTIMESTAMP

 

The server UTC date and time when the connection was initiated.

CONNECTION_USER_NAME

DBTYPE_WSTR

 

The connection user name.

This schema rowset is not sorted.

Restriction Columns

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

Column name

Type indicator

Restriction State

CONNECTION_ID

DBTYPE_I4

Optional.

CONNECTION_USER_NAME

DBTYPE_WSTR

Optional.

CONNECTION_IMPERSONATED_USER_NAME

DBTYPE_WSTR

Optional.

CONNECTION_HOST_NAME

DBTYPE_WSTR

Optional.

CONNECTION_ELAPSED_TIME_MS

DBTYPE_I8

Optional.

CONNECTION_IDLE_TIME_MS

DBTYPE_I8

Optional.

CONNECTION_LAST_COMMAND_ELAPSED_TIME_MS

DBTYPE_I8

Optional.

See Also

Reference