Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2009
    Posts
    1

    Unanswered: Deadlock error after making multiple INSERTs

    I'm looping thru a collection of records gotten from a SELECT statement on a DB2 table and from each of these records I'm inserting a new row in the same table. First I do the SELECT query, add each row's info to a java collection, then go thru the collection and for each object in the collection I call an insert method which inserts a new row (not a duplicate, I've changed some of the key info) in the same table that I did the SELECT on.

    From my debug code I seem to be going thru the right methods the right number of times and not generating any errors, but it's not inserting the rows in the table and when I try and access the table after I've run the routine I get the following error:
    Unsuccessful execution caused by deadlock or timeout. Reason code "00C9008E"

  2. #2
    Join Date
    Jul 2009
    Location
    NY
    Posts
    963
    Depends on your instalation setting you have to make commits after some number of inserts (updates, deletes).

    Lenny

  3. #3
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    00C9008E is a lock timeout. Do you have multiple connections or just 1?
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

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