db gets deadlocked while trying to delete records

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rkr43
    New Member
    • Mar 2008
    • 1

    db gets deadlocked while trying to delete records

    My db2 database gets into deadlock if I try to execute delete query. This happens only if
    Database is Consistent=NO
    Can any help me in understanding this and is their any guidelines for executing Delete query.

    Thanks in Advance
    Rahul Kumar
  • docdiesel
    Recognized Expert Contributor
    • Aug 2007
    • 297

    #2
    Hi,

    for a deadlock there have to be at least two applications accessing the database. So what's the second one?

    Besides, to avoid greater (timely) damage by dead locks, you may set the lock timeout for the current transaction by "SET CURRENT LOCK TIMEOUT <seconds>;" (See also http://www.thescripts.com/forum/thread185389.html ).

    Regards,

    Bernd

    Comment

    Working...