Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2008
    Posts
    7

    Unhappy Unanswered: Often lock row/table after v9 upgrade

    Under the same web server (Websphere), I have tested to connect to v8 & v9. When I got an error (e.g. null pointer exception) during update, it is caused by my bug because I wrongly enter some fields/or forget to enter some fields.

    However, the behaviors of v8 & v9 are totally different. For v8, it will return the error within 1-2 sec. For v9, it holds my screen for more then 5min but cannot return anything. Finally, I find the record/table is locked in DB. I can repeat this easily and lock different tables's record....

    Does anyone know what's the problem? Or what is needed to set?
    Thanks.

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    db2 connect to <db-name>
    db2 update db cfg using LOCKTIMEOUT 20

    You may have to disconnect all applications for it to take effect. Restart of instance will obviously suffice.

    But you may have other issues also, such as not using an index (locking all rows in the table instead of the one you want). Make sure you run runstats on table and all indexes, and if that is still a problem, then alter the table to volatile.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Sep 2008
    Posts
    7
    Since I am just upgrade my v9 from v8, do I need to set this again? I suppose DB2 will directly syn such setting from v8.

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    If your application is waiting for a lock for more than 5 mintues, then your locktimeout cannot be set to 20 seconds. But I don't know for sure what "lock" problem you actaully encountered (not enough information supplied in your post).
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Sep 2008
    Posts
    7
    Actually, it should be complete the operation within 2-3 sec. But it just hold an wait .....

Posting Permissions

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