SQL Server checks whether tasks are not submitted, stops the progress, and removes the table deadlock. the SQL Server process is deadlocked.
If there are uncommitted tasks in the data warehouse, the related tables will remain in the dead warehouse, affects the query of other processes (unless with (nolock) is used in the query )).
Due to the separation of transactions, other sessions cannot submit transactions through RollBack Transaction. Only the progress of the non-submitted transactions can be terminated, then, the task is terminated by the atomicity of the task, and the task is rolled back.
How can I find uncommitted tasks?
Run the following command:
DBCC OpenTran
The results are as follows:
SPID is the progress ID. Run the following command to stop the progress:
Kill 52 -- 52 is the SPID of the non-submitted event.
Additional references:
-- Query the select object_name (P. object_id) as TableName, resource_type, resource_description, request_session_id, L. resource_database_idfrom sys. dm_tran_locks L join sys. partitions P on L. resource_associated_entity_id = p. hobt_idWHERE L. resource_database_id = DB_ID (); -- query the blocking (Blocked) process SELECT * FROM sys. dm_exec_requests WHERE blocking_session_id <> 0