Deadlock in SQL Server, not in DB2/Oracle

  • Hi,

    We use different databases based on the client request. So, we configure the type of database being used in the code.

    The problem is, there is a transaction which is causing the deadlock in MSSQL Server 2005 Express. But the same thing works fine in DB2 V8 and Oracle 9i+

    So, it seems there is no problem with code and is with the SQL Server. Is there anyway of resolving this by increasing the page size or any such workarounds?

    Thanks,

    TNV

  • Locking mechanisms are very, very different between Oracle, DB2 and SQL. It's not unexpected that something that works on 1 will give problems on another. Things that work well on Oracle are problematic on SQL and vis versa

    To fix the deadlocks, you need to find the source of the problem (the code) and fix it. It may be poor indexing, it may be poor code, it's usually a mixture of both.

    Switch traceflag 1222 on (DBCC TRACEON(1222,-1)) and then run the code (if the deadlock can be reproduced on demand). The deadlock graph will be written into the SQL error log. It'll tell you the code that caused the deadlock and the resources that were involved. Post the graph here if you're not sure how to interpret it.

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

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