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 > Table Locking Problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-26-04, 15:48
beckdb2 beckdb2 is offline
Registered User
 
Join Date: Mar 2004
Posts: 24
Table Locking Problem

DB2 UDB V8.1.2 on AIX-

I am having a recurring problem with a couple of users getting deadlocks. They are just running select statements. One user is using the Command Center and the other user is using a Third Party tool called Ascential DataStage. Nevertheless, they run into this problem quite frequently.

Are there any known problems with the Command Center and holding locks?

Thanks,

Beck
Reply With Quote
  #2 (permalink)  
Old 05-26-04, 16:06
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
First you need to figure out if you have a deadlock or lock timeout. Reason code 2 is a deadlock, and 68 is a lock timeout. If you are getting lock timeouts, check the locktimeout database parameter (check the Administration Guide: Performance for details).

Normally, one would not have a locking problem with select statements only. You might want to check the autocommit option to make sure it is being used. Also, adding commits to your scripts could help in some situations.

If you are running certain utilities from the command center, then lock contention could be a problem if the utility needs an exclusive use of the table.
__________________
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 05-26-04, 16:10
bmujeeb bmujeeb is offline
Registered User
 
Join Date: Mar 2004
Posts: 448
select statement should not cause any deadlock problems.
create event monitor for deadlock.
check if some application getting exclusive table locks, but this should not
be a problem in a select enviroment.
also get the snapshot of the application.

regards,

mujeeb
Reply With Quote
  #4 (permalink)  
Old 05-26-04, 17:28
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
I think the problem most likely is in Command Centre: if a user switches to the "Query results" tab and positions the cursor (UI cursor, not the database one) on one of the records that records gets locked until the window is closed or "Commit" button is clicked.. If you can't outlaw Command Centre in your organization then the only alternative is to educate your users not to keep the results window open for long. Command Centre isn't a good end user tool anyway...
Reply With Quote
  #5 (permalink)  
Old 05-27-04, 16:55
beckdb2 beckdb2 is offline
Registered User
 
Join Date: Mar 2004
Posts: 24
Thanks,

I will look into that.
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