If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Often lock row/table after v9 upgrade

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-08-08, 20:44
lung4 lung4 is offline
Registered User
 
Join Date: Sep 2008
Posts: 7
Unhappy 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.
Reply With Quote
  #2 (permalink)  
Old 09-08-08, 21:31
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #3 (permalink)  
Old 09-08-08, 22:15
lung4 lung4 is offline
Registered User
 
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.
Reply With Quote
  #4 (permalink)  
Old 09-09-08, 01:12
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #5 (permalink)  
Old 09-09-08, 01:24
lung4 lung4 is offline
Registered User
 
Join Date: Sep 2008
Posts: 7
Actually, it should be complete the operation within 2-3 sec. But it just hold an wait .....
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On