question about deadlocks

  • hello, do deadlocks only happen for transactions or two processes trying to update the same record or set of records. I was having a deadlock situation and i ran the profiler deadlock graph and i see two stored procedures are causing this, but none of the two sps have transactions, they just do a select.

  • Then the question is any of the two using cursor because the Fetch statement is an implicit transaction per ANSI SQL definition.

    Here is Microsoft deadlock analysis and it covers all statements not just transactions.

    http://msdn.microsoft.com/en-us/library/ms188246.aspx

    Kind regards,
    Gift Peddie

  • thanks!! i don't have any cursors in the stored procedures.

    according to the article a select can cause a deadlock

    i will check on table structures as well as indexing. thank you again.

  • Post the deadlock graph?

    Two selects should not be able to deadlock unless there are strange locking hints used.

    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 4 posts - 1 through 3 (of 3 total)

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