locked
Prevent blocking : Update query RRS feed

  • Question

  • If there are blocking query 1 update is blocking another update ( same query but different row). The

    blocked process is waiting for an Lock : U for a table Key.

    How to solve it ?

    Tuesday, March 12, 2019 7:17 AM

Answers

  • oh sorry. it's updating the same row. ...
    • Marked as answer by sakurai_db Wednesday, March 13, 2019 4:38 PM
    Tuesday, March 12, 2019 9:11 AM

All replies

  • There are several ways on how we can avoid deadlocks. Please read 

    https://sqlindian.wordpress.com/2012/07/06/sql-server-deadlocks-and-live-lockscommon-patterns/

    https://blogs.msdn.microsoft.com/bartd/tag/SQL-Deadlocks/


    Regards, Dineshkumar,
    Please Mark as Answer if my post answers your question and Vote as Helpful if it helps you

    DWBI Blog

    • Proposed as answer by Suman Zakka Tuesday, March 12, 2019 11:59 AM
    Tuesday, March 12, 2019 7:26 AM
  • What do you want to "solve" here; that's the way RDBMS works, with ACID princip. SQL Server has lock escalation and so we have not only row locks, but also page locks.

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Tuesday, March 12, 2019 7:29 AM
    Answerer
  • is it escalate to key lock ??

    it's a key lock with lockmode : U

    Tuesday, March 12, 2019 8:04 AM
  • oh sorry. it's updating the same row. ...
    • Marked as answer by sakurai_db Wednesday, March 13, 2019 4:38 PM
    Tuesday, March 12, 2019 9:11 AM
  • Hi sakurai,

     

    I'm glad to know that you have found your issue . In order to close this thread, please kindly mark helpful replies as answers. By doing so, it will benefit all community members who are having this similar issue.  Your contribution is highly appreciated.

     

    Best regards,

    Dedmon Dai


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Wednesday, March 13, 2019 1:58 AM