It's all about the answers!

Ask a question

I see a deadlock on my ccm SQL server database . Is there a way to prevent it?


Glenn Bardwell (58621527) | asked Nov 16 '12, 9:55 a.m.
JAZZ DEVELOPER
 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

One answer



permanent link
Glenn Bardwell (58621527) | answered Nov 16 '12, 9:57 a.m.
JAZZ DEVELOPER
Make sure you have set the READ_COMMITTED_SNAPSHOT.This setting will avoid many deadlocks.  See the infocenter link for details. 

http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0/topic/com.ibm.jazz.install.doc/topics/t_s_server_installation_setup_sql.html

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.