TechNet
Export (0) Print
Expand All

sys.dm_tran_active_transactions (Transact-SQL)

 

THIS TOPIC APPLIES TO: yesSQL Server (starting with 2008)yesAzure SQL DatabaseyesAzure SQL Data Warehouse yesParallel Data Warehouse

Returns information about transactions for the instance of SQL Server.

System_CAPS_ICON_note.jpg Note


To call this from Azure SQL Data Warehouse Public Preview or Parallel Data Warehouse, use the name sys.dm_pdw_nodes_tran_active_transactions.

Column NameData TypeDescription
transaction_idbigintID of the transaction at the instance level, not the database level. It is only unique across all databases within an instance but not unique across all server instances.
namenvarchar(32)Transaction name. This is overwritten if the transaction is marked and the marked name replaces the transaction name.
transaction_begin_timedatetimeTime that the transaction started.
transaction_typeintType of transaction.

1 = Read/write transaction

2 = Read-only transaction

3 = System transaction

4 = Distributed transaction
transaction_uowuniqueidentifierTransaction unit of work (UOW) identifier for distributed transactions. MS DTC uses the UOW identifier to work with the distributed transaction.
transaction_stateint0 = The transaction has not been completely initialized yet.

1 = The transaction has been initialized but has not started.

2 = The transaction is active.

3 = The transaction has ended. This is used for read-only transactions.

4 = The commit process has been initiated on the distributed transaction. This is for distributed transactions only. The distributed transaction is still active but further processing cannot take place.

5 = The transaction is in a prepared state and waiting resolution.

6 = The transaction has been committed.

7 = The transaction is being rolled back.

8 = The transaction has been rolled back.
transaction_statusintIdentified for informational purposes only. Not supported. Future compatibility is not guaranteed.
transaction_status2intIdentified for informational purposes only. Not supported. Future compatibility is not guaranteed.
dtc_stateintApplies to: Azure SQL Database (Initial release through current release).

1 = ACTIVE

2 = PREPARED

3 = COMMITTED

4 = ABORTED

5 = RECOVERED
dtc_statusintIdentified for informational purposes only. Not supported. Future compatibility is not guaranteed.
dtc_isolation_levelintIdentified for informational purposes only. Not supported. Future compatibility is not guaranteed.
filestream_transaction_idvarbinary(128)Applies to: Azure SQL Database (Initial release through current release).

 Identified for informational purposes only. Not supported. Future compatibility is not guaranteed.
pdw_node_idintApplies to: Azure SQL Data Warehouse Public Preview, Parallel Data Warehouse

The identifier for the node that this distribution is on.

Requires VIEW SERVER STATE permission on the server.

sys.dm_tran_session_transactions (Transact-SQL)
sys.dm_tran_database_transactions (Transact-SQL)
Dynamic Management Views and Functions (Transact-SQL)
Transaction Related Dynamic Management Views and Functions (Transact-SQL)

Community Additions

ADD
Show:
© 2016 Microsoft