Skip to content

Latest commit

 

History

History
84 lines (75 loc) · 5.22 KB

sys-dm-db-xtp-transactions-transact-sql.md

File metadata and controls

84 lines (75 loc) · 5.22 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs monikerRange
sys.dm_db_xtp_transactions (Transact-SQL)
sys.dm_db_xtp_transactions reports the active transactions in the In-Memory OLTP database engine.
rwestMSFT
randolphwest
08/31/2023
sql
system-objects
reference
sys.dm_db_xtp_transactions
sys.dm_db_xtp_transactions_TSQL
dm_db_xtp_transactions
dm_db_xtp_transactions_TSQL
sys.dm_db_xtp_transactions dynamic management view
TSQL
>=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current

sys.dm_db_xtp_transactions (Transact-SQL)

[!INCLUDE sql-asdb-asdbmi]

Reports the active transactions in the [!INCLUDE inmemory] database engine.

For more information, see [[!INCLUDE inmemory] (In-Memory Optimization)](../in-memory-oltp/overview-and-usage-scenarios.md).

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 [!INCLUDE sssql19-md] and previous versions, requires VIEW DATABASE STATE permission on the database.

For [!INCLUDE sssql22-md] and later versions, requires VIEW DATABASE PERFORMANCE STATE permission on the database.

Related content