Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

Deadlocks with simple UPDATE statement

$
0
0

I have in a C# program a dictionary and in SQL Server a stored procedure with a simple UPDATE statement. I process the dictionary in parallel. For each entry in my dictionary I call this stored procedure and I am getting deadlocks.

This is the UPDATE statement:

ALTER PROCEDURE [dbo].[UpdateImages]

@ICRTCode nvarchar(max),
@ICRTImage nvarchar(max)

AS
BEGIN
UPDATE Images SET processed = '1', Image = @ICRTImage, ProcessDate = GETDATE() WHERE IDICRT = @ICRTCode
END

Can someone give me a hint as to why this would cause deadlocks? There are no other processes writing to this table. This is a table in a staging database.


Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>