• Eric M Russell (9/29/2016)


    Lynn Pettis (9/28/2016)


    Pingala (9/28/2016)


    Thanks. We implemented the RETRY to avoid deadlock. However, I am surprised how a queued DELETE got a deadlock in the first place if SQL Server does queued operations sequentially.

    I am not even sure what you mean by a queued delete.

    I'm assuming there is a mechanism by which requests for deletes are queued asynchonously, and then a process executes them sequentially to prevent parallel delete operations. If there are deletes, then I assume there must also be inserts so maybe that's when the blocking occurs.

    The only mechanism I know of is Service Broker and depending on that is configured you could still run deletes in parallel.

    Wait, you could use a table and a scheduled SQL Server Agent job to handle it as well.