how dead lock happens + solution indetail ?

  • HI all,

    Please suggest me any link or site or free books to reffer completely about dead lock ?

    Whats that?,how it happens ? how to identify ?

    and how to resolve with best practice ?

    With Thanks,

    Ravi

  • A deadlock quite simply is when two or more processes are waiting for locks that the other processes have. None can continue until the locks are released, none will release locks without continuing, so they are stuck.

    SQL has a deadlock detector that looks for circular locks and, if it finds any, picks a victim process and rolls it back. There's a discussion of deadlocks and the deadlock graph in chapter 42 of SQL Server MVP Deep Dives 1

    As for fixing, there's no single solution. It's usually about optimising the queries. improving indexes or sometimes reordering statements within the transaction.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thank you very much both of you :). Just i wanted to know internally how it detrmines dead lock is happened and how it checks each and every time,

    what are the main cause for the dead lock and all .

    I ll reffer that book what u suggested . Thank u .

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply