Exportera (0) Skriv ut
Visa allt
Expand Minimize
EN
Det här innehållet finns inte tillgängligt på ditt språk men här finns den engelska versionen,

sys.dm_tran_session_transactions

Updated: April 2, 2011

This topic is OBSOLETE. You can find the most current version in the SQL 14 Transact-SQL Reference.

ImportantImportant
This topic is not maintained. For the current version, see sys.dm_tran_session_transactions.

Returns correlation information for associated transactions and sessions.

 

Column name Data type Description

session_id

int

ID of the session under which the transaction is running.

transaction_id

bigint

ID of the transaction.

transaction_descriptor

binary(8)

Transaction identifier used by SQL Server when communicating with the client driver.

enlist_count

int

Number of active requests in the session working on the transaction.

is_user_transaction

bit

1 = The transaction was initiated by a user request.

0 = System transaction.

is_local

bit

1 = Local transaction.

0 = Distributed transaction or an enlisted bound session transaction.

is_enlisted

bit

1 = Enlisted distributed transaction.

0 = Not an enlisted distributed transaction.

is_bound

bit

1 = The transaction is active on the session via bound sessions.

0 = The transaction is not active on the session via bound sessions.

Requires VIEW SERVER STATE permission on the server.

Through bound sessions and distributed transactions, it is possible for a transaction to be running under more than one session. In such cases, sys.dm_tran_session_transactions will show multiple rows for the same transaction_id, one for each session under which the transaction is running.

By executing multiple requests in autocommit mode using multiple active result sets (MARS), it is possible to have more than one active transaction on a single session. In such cases, sys.dm_tran_session_transactions will show multiple rows for the same session_id, one for each transaction running under that session.

Gruppinnehåll

Lägg till
Visa:
© 2014 Microsoft