first, how to track the deadlock
Tracking methods See: http://guobaoguo.blog.163.com/blog/static/109162582010112311553185/
I chose the second one, and then I got a part of the trace file.
1. Graphical presentation of SQL Server Profiler
2. Extracted XML data
Ii. deadlock victims victim= "Process98274c8" three, look at the process, resource node
Process
1, process98274c8--report query
2, process9862748--across 3 machines, DTC distributed transactions, long time
Resource
1. Resources used: Table =fa_voucher, Index =pk_fa_voucher,
process9862748 do insert operation, plus exclusive x lock,
PROCESS98274C8 Application Ranges-s Lock, request type wait
2. Resources used: Table =yw_cwdistributioninfo,
Process98274c8 do query, plus share S lock,
process9862748 application six lock, request type Convert, here is not too understanding of convert
3, according to the Lock compatibility mode table to see the above two are conflicting, is also a deadlock
https://msdn.microsoft.com/zh-cn/library/jj856598 (v=sql.120). aspx
Iv. Solutions
1, report query add with (NOLOCK), non-real-time, allow dirty read.
2, later look at the tracking situation, if possible split distributed transactions, instead of message mode
Deadlock, simply take a look