Results 1 to 3 of 3

Thread: deadlock

  1. #1
    Join Date
    Mar 2005
    Posts
    73

    Arrow Unanswered: deadlock

    UDB V8.2
    OS : AIX

    I have got this particular query ,,which is failing with deadlock error.
    "delete from xxxy where policeis null and logon not in (select logon from emp"

    DB21034E The command was processed as an SQL statement because it was not a
    valid Command Line Processor command. During SQL processing it returned:
    SQL0911N The current transaction has been rolled back because of a deadlock
    or timeout. Reason code "2". SQLSTATE=40001

    there is no other thred which is using this particular table.
    I see other statements with the same table name but a different table name in subselect is executing.

    what could be the reason for failure?

  2. #2
    Join Date
    Aug 2004
    Posts
    138
    get snapshot for locks while you run this statement..it explains who is waiting , who is locking
    db2 'reset monitor all'
    db2 'update monitor switches .....'
    db2 'get snapshor for locks on dbname'

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Concert the query and sub-query to where not exists (select ...
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •