Eirikur Eiriksson (9/26/2016)
No, a session cannot deadlock itself and there are two different spids in there, spid="186" & spid="200".😎
On the other hand, this looks like a multi threaded Entity Framework application where one thread is deadlocking another. I can easily see few of these
(@0 varchar(20),@1 varchar(max) ,@2 datetime2(7))INSERT [dbo].[MessageLog]([AppModule], [ErrorMessage], [CreatedDate])
VALUES (@0, @1, @2)
SELECT [oid]
FROM [dbo].[MessageLog]
WHERE @@ROWCOUNT > 0 AND [oid] = scope_identity() running at the same time causing a little congestion.
Thanks Eirikur. You are right these are from Entity Framework application. I have created index on table MessageLog on column Oid and i think it resolved the issue. Do you think still there can be chances.