E.4MON$CONTEXT_VARIABLES

MON$CONTEXT_VARIABLES displays information about custom context variables.

Column NameData TypeDescription

MON$ATTACHMENT_ID

BIGINT

Connection identifier. It contains a valid value only for a connection-level context variable. For transaction-level variables it is NULL.

MON$TRANSACTION_ID

BIGINT

Transaction identifier. It contains a valid value only for transaction-level context variables. For connection-level variables it is NULL.

MON$VARIABLE_NAME

VARCHAR(80)

Context variable name

MON$VARIABLE_VALUE

VARCHAR(32765)

Context variable value

Retrieving all session context variables for the current connection

  |SELECT
  |  VAR.MON$VARIABLE_NAME,
  |  VAR.MON$VARIABLE_VALUE
  |FROM MON$CONTEXT_VARIABLES VAR
  |WHERE VAR.MON$ATTACHMENT_ID = CURRENT_CONNECTION