how to determine what query causes deadlock code example Example: mssql find deadlocks --[status] EXEC sp_whoisActive;