Posts: 28
Name: Matt
Location: Veldhoven, Netherlands
|
it seems only one SP is causing these deadlocks, and it's never chosen as the deadlock victim.
Please can someone tell me how to change the following SP into a Try/Catch to avoid deadlocking?
ALTER PROCEDURE [dbo].[SP_UpdateUserIPandTime](@User_ID INT,@IP nvarchar (16))
AS UPDATE dbo.TABLENAME
SET COLUMNNAME1 = GETDATE(), COLUMNNAME2 = @IP
WHERE (COLUMNNAME3 = @User_ID)
I suppose this may now need to be in the SQL forum, so I'll post there also.
Thanks
|