sys.dm_db_xtp_transactions (Transact-SQL)

Applies to: SQL Server Azure SQL Database Azure SQL Managed Instance

Reports the active transactions in the In-Memory OLTP database engine.

For more information, see In-Memory OLTP (In-Memory Optimization).

Column name Data type Description
node_id smallint ID of the node
xtp_transaction_id bigint Internal ID for this transaction in the XTP transaction manager
transaction_id bigint The transaction ID. Joins with the transaction_id in other transaction-related DMVs, such as sys.dm_tran_active_transactions.

0 for XTP-only transactions, such as transactions started by natively compiled stored procedures.
session_id smallint The session_id of the session that is executing this transaction. Joins with sys.dm_exec_sessions
begin_tsn bigint Begin transaction serial number of the transaction
end_tsn bigint End transaction serial number of the transaction
state int The state of the transaction:

0 - ACTIVE
1 - COMMITTED
2 - ABORTED
3 - VALIDATING
state_desc nvarchar The description of the transaction state
result int The result of this transaction. The following are the possible values.

0 - IN PROGRESS
1 - SUCCESS
2 - ERROR
3 - COMMIT DEPENDENCY
4 - VALIDATION FAILED (RR)
5 - VALIDATION FAILED (SR)
6 - ROLLBACK
result_desc nvarchar The result of this transaction. The following are the possible values.

IN PROGRESS
SUCCESS
ERROR
COMMIT DEPENDENCY
VALIDATION FAILED (RR)
VALIDATION FAILED (SR)
ROLLBACK
xtp_parent_transaction_node_id smallint Internal use only
xtp_parent_transaction_id bigint Internal use only
last_error int Internal use only
is_speculative bit Internal use only
is_prepared bit Internal use only
is_delayed_durability bit Internal use only
memory_address varbinary Internal use only
database_address varbinary Internal use only
thread_id int Internal use only
read_set_row_count int Internal use only
write_set_row_count int Internal use only
scan_set_count int Internal use only
savepoint_garbage_count int Internal use only
log_bytes_required bigint Internal use only
count_of_allocations int Internal use only
allocated_bytes int Internal use only
reserved_bytes int Internal use only
commit_dependency_count int Internal use only
commit_dependency_total_attempt_count int Internal use only
scan_area int Internal use only
scan_area_desc nvarchar Internal use only
scan_location int Internal use only
dependent_1_address varbinary(8) Internal use only
dependent_2_address varbinary(8) Internal use only
dependent_3_address varbinary(8) Internal use only
dependent_4_address varbinary(8) Internal use only
dependent_5_address varbinary(8) Internal use only
dependent_6_address varbinary(8) Internal use only
dependent_7_address varbinary(8) Internal use only
dependent_8_address varbinary(8) Internal use only

Permissions

For SQL Server 2019 (15.x) and previous versions, requires VIEW DATABASE STATE permission on the database.

For SQL Server 2022 (16.x) and later versions, requires VIEW DATABASE PERFORMANCE STATE permission on the database.

See also

Next steps