I'm working with SQL Server 2012 Express Edition and I getting this error:
Transaction (Process ID 53) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
I've added these two commands to show more information about it:
DBCC TRACEON(1204, -1) DBCC TRACEON(1222, -1)
With these two commands I get this log. But I don't know how to find where the problem is.
sp_lock I have identified that the problem is on table
TRZIC.dbo.CODES and it has a
On this table I'm updating rows and inserting new ones at the same time.
Any advice? How can I solve this deadlock?