문제

I am finding it difficult to find solution for this deadlock. The select query is taking shared lock over index I_SEM_AGENT_COMPUTER_ID_PLUS, at the same time update query updates a record (say r1) in table and then tries to update the index I_SEM_AGENT_COMPUTER_ID_PLUS (this index has columns in include clause that are updated by update query ) However select is requesting record r1 in shared mode. What can be possible solution to this? Apart from creating a new non-clustered index for select. Note: Dirty reads not allowed, READPAST can't be used as this can return no records failing purpose of select here

도움이 되었습니까?

해결책

Finally solved this problem, rearranged both the queries to access the resources in the same order. That solved the problem.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top