sys.dm_exec_requests vs sys.dm_tran_active_transactions

  • Ok I cant get my head around this and the correlation (if any) between the two

    sys.dm_exec_requests ~ -looks at current runnable queue and returns information about each request that is executing within SQL Server

    sys.dm_tran_active_transactions ~ current information about transactions.

    Ok so surely a currently executing piece of user code is a transaction .. or indeed is made up of them

    so is sys.dm_tran_active_transactions a more granular take on exec_requests or am I totally barking up the wrong tree ??

    thank you

    simon

  • Requests & Transactions are different.

    A request has a SessionId. This can be used to get to the sys.dm_tran_session_transactions dmv. This then links to sys.dm_tran_active_transactions through the transactionid.

    So, yeah, a request could have a one or more transactions associated with it and some set of those transactions could be active.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • thank you grant much appreciated 🙂

    ~simon

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply