


These transactions aren't associated with any real session ID, but instead are associated artificially with session ID = '-2'. Use KILL to stop unresolved distributed transactions. For more information about monitoring distributed transactions, see the MS DTC documentation. UOW also can be obtained from the error log or through the MS DTC monitor. UOW is a GUID that may be obtained from the request_owner_guid column of the sys.dm_tran_locks dynamic management view. Identifies the Unit of Work ID (UOW) of distributed transactions. Nt_domain, login_name, connect_time, last_request_end_time The following query can help you identify the session_id that you want to kill: SELECT ssion_id, host_name, program_name, When the connection ends, the integer value is released and can be reassigned to a new connection. The session ID value is tied to the connection for the duration of the connection. session_id is a unique integer ( int) that is assigned to each user connection when the connection is made. To view Transact-SQL syntax for SQL Server 2014 and earlier, see Previous versions documentation. Syntax for Azure Synapse Analytics and Parallel Data Warehouse Transact-SQL Syntax Conventions Syntax - Syntax for SQL Server If MS DTC is in use, you can also use the statement to end orphaned and in-doubt distributed transactions. At times, Microsoft Distributed Transaction Coordinator (MS DTC) might be in use. KILL ends a normal connection, which internally stops the transactions that are associated with the specified session ID. The process takes longer to complete particularly when the process involves rolling back a long transaction. If the specified session ID or UOW has much work to undo, the KILL statement may take some time to complete. Applies to: SQL Server (all supported versions) Azure SQL Database Azure SQL Managed Instance Azure Synapse Analytics Analytics Platform System (PDW)Įnds a user process that is based on the session ID or unit of work (UOW).
