If you get a situation where a mirror failover hangs and you see a process blocked by -2 then take these steps:
Run a KILL based on the UOW_GUID with the transaction’s unit of work ID from sys.dm_tran_active_transactions.
Example:
SELECT *
FROM sys.dm_tran_active_transactions
WHERE transaction_id IN (
SELECT request_owner_id
FROM sys.dm_tran_locks
WHERE request_session_id = -2
);
Get the transaction_uow (GUID) from above, then:
KILL ‘put-your-guid-here’;
e.g KILL ‘4A1B65AB-EC07-4B0A-967D-E41D326138D6’
If it still persists, restart the MSDTC service:
net stop msdtc
net start msdtc