Dead Lock Help..

  • Hi All,

    I need big favor, Here is my question, I am getting dead lock error.

    When I try to insert data from Application, the table I am inserting data has trigger, I think

    thats why I am getting dead lock error. The SP I am using through Application to insert data, its very simple

    only two statment, first Insert statement and then Update statement, I am using 5 second delay on both statement

    but still having problem. Any advise?

    Thank You,

  • Could you share some more information such as execution plan, sp_lock and sp_who2 output?

    Also check out these two articles

    😎

    How To Monitor Deadlocks in SQL Server

    Detecting and Ending Deadlocks

  • Disable the trigger and try again.

    What does the trigger do (update other tables, etc.)?

    Do you run a transaction?

  • SQL Server 2008 has a system_health extended event session. I'm pretty sure it's capturing information from your deadlock called a deadlock graph. You'll need to query the files to get the information. Here's an article on how to get that done[/url]. You won't have to turn on traceflags or recreate the issue. When you have the deadlock graph, zip it up and post it here to get help interpreting it.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • And for some general info - https://www.simple-talk.com/sql/performance/sql-server-deadlocks-by-example/

    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

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

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