I see a deadlock on my ccm SQL server database . Is there a way to prevent it?
I see a deadlock on my ccm SQL server database for. Is there a way to prevent it?
The deadlock looks like
SQL: select t1.ITEM_ID, t1.STATE_ID from (select * from REPOSITORY.CHANGE_EVENT r1 where r1.CONTEXT_ID in(?, ?, ?)) t1 where ((t1.MODIFIED >= ?) and ((t1.EVENT_PROCESS_AREA_ITEM_ID = ?) or (t1.EVENT_PROCESS_AREA_ITEM_ID = ?) or (t1.EVENT_PROCESS_AREA_ITEM_ID = ?) or (t1.EVENT_PROCESS_AREA_ITEM_ID = ?) or (t1.EVENT_PROCESS_AREA_ITEM_ID = ?) or (t1.EVENT_PROCESS_AREA_ITEM_ID = ?)) and (t1.EVENT_CATEGORY <> ?) and (t1.EVENT_CATEGORY <> ?)) order by t1.EVENT_TIME desc
SQL Exception #1
SQL Message: Transaction (Process ID 84) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
SQL State: 40001