I am analyzing a blocked process report and my blocking-process XML is as follows (some sections redacted for simplicity)
<blocking-process>
<process status="running"
spid="123"
sbid="0"
ecid="0"
priority="0"
trancount="2"
lastbatchstarted="2019-11-22T03:00:00.347"
lastbatchcompleted="2019-11-22T03:00:00.347"
lastattention="1900-01-01T00:00:00.347"
clientapp="MyAppName"
hostname="MyServer"
hostpid="6596"
loginname="MyLogin2"
isolationlevel="read committed (2)"
xactid="184723528"
currentdb="6"
currentdbname="MyDB"
Timeout="4294967295"
clientoption1="536870944"
clientoption2="128056">
<executionStack>
</executionStack>
<inputbuf>
</inputbuf>
</process>
</blocking-process>
my blocked-process XML is as follows
<blocked-process>
<process id="process89e4c7f848"taskpriority="0"
logused="256"
waitresource="KEY: 6:72057594046447616 (4bc05a090cdd)"
waittime="13730"
ownerId="184723742"
transactionname="user_transaction"
lasttranstarted="2019-11-22T03:00:09.190"
XDES="0x89d0786e80"
lockMode="X"
schedulerid="33"
kpid="8176"
status="suspended"
spid="112"
sbid="0"
ecid="0"
priority="0"
trancount="2"
lastbatchstarted="2019-11-22T03:00:09.207"
lastbatchcompleted="2019-11-22T03:00:09.207"
lastattention="1900-01-01T00:00:00.207"
clientapp=".Net SqlClient Data Provider"
hostname="MyServer"
hostpid="1092"
loginname="MyLogin"
isolationlevel="read committed (2)"
xactid="184723742"
currentdb="6"
currentdbname="MyDB"
lockTimeout="4294967295"
clientoption1="671088672"
clientoption2="128056">
<executionStack>
</executionStack>
<inputbuf>
</inputbuf>
</process>
</blocked-process>
I can find the database and object affected in the blocking-process node:
waitresource="KEY: 6:72057594046447616 (4bc05a090cdd)"
However, what I don't know is what lock the blocking process held. I can see lockMode="X"
in the blocked process node so my question ism does lockMode="X"
relate to the lock that the blocking process was holding or the lock that the blocked process was trying to get?