My SQL Server version is Microsoft SQL Server 2019 (RTM) and I faced a new locking problem.
An SSIS package was running. After a while it became suspended by a session with ID of (-2). I know this type of session belongs to an orphan transaction but I do not know how to solve it. The package is transactional and the transaction is DTC.
First of all I checked the detail of session in Activity Monitor and it was:
sys.sp_describe_first_result_set
It mean nothing for me. Why a system procedure?
Then I try KILL the orphan session using:
Select req_transactionUOW
from master..syslockinfo
where req_spid = -2
KILL '93ED58CC-5D18-4A08-82FC-1AE9A40E4E3C'
Which '93ED58CC-5D18-4A08-82FC-1AE9A40E4E3C'
is the output of SELECT
query.
But it kills the package session and orphan transaction together.