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 > Lock Wait problems with DB2 8.2 Express Edition

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-18-10, 09:18
ricardovp ricardovp is offline
Registered User
 
Join Date: Mar 2010
Location: São Paulo, Brazil
Posts: 7
Lock Wait problems with DB2 8.2 Express Edition

Hi guys, I’m facing some problems when I install DB2 8.2 Express Edition (fix pack 18) on Windows XP...

After install it and create my database from a backup, if I try to connect with more than 1 client, the second connection status switch to “Lock Wait Time”…

The weird thing is that it’s not happening to all installations, just some of them… and if I do the downgrade to the DB2 6.1, everything works just fine…

Does anyone know what’s happening?
Thanks!

Last edited by ricardovp; 03-18-10 at 09:23.
Reply With Quote
  #2 (permalink)  
Old 03-18-10, 09:32
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,574
What is happening when you are connecting? The connection itself should not wait on anything.

Andy
Reply With Quote
  #3 (permalink)  
Old 03-18-10, 10:28
ricardovp ricardovp is offline
Registered User
 
Join Date: Mar 2010
Location: São Paulo, Brazil
Posts: 7
Sorry Andy, I’ve forgot to say that... I’m running an application that connects to the database (the connection is fine), and when it tries to make a SELECT statement, it locks… I’m doing nothing but SELECT statements in both clients!
Reply With Quote
  #4 (permalink)  
Old 03-18-10, 10:34
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,574
Download the monitor located here:

IBM DB2 UDB Performance monitor

Then use it to determine what each application is doing. Obviously one of them is locking out the other.

Andy
Reply With Quote
  #5 (permalink)  
Old 03-18-10, 12:37
ricardovp ricardovp is offline
Registered User
 
Join Date: Mar 2010
Location: São Paulo, Brazil
Posts: 7
Ok Andy, thanks for the monitor... At least now I know which tables are locked, now I just have to know why, because when I change the DB2 to the version 6, this tables are not locked…’m sending a attachment containing the screen of my monitor… Thanks again!!!
Attached Thumbnails
Lock Wait problems with DB2 8.2 Express Edition-imagem.jpg  
Reply With Quote
  #6 (permalink)  
Old 03-18-10, 12:54
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,574
Look at the general tab instead of the locks tab. It should show you the SQL statement that are being used.

Andy
Reply With Quote
  #7 (permalink)  
Old 03-18-10, 13:03
ricardovp ricardovp is offline
Registered User
 
Join Date: Mar 2010
Location: São Paulo, Brazil
Posts: 7
I've looked there... But the last command issued was a SQL Close, as you can see here...
Attached Thumbnails
Lock Wait problems with DB2 8.2 Express Edition-imagem.jpg  
Reply With Quote
  #8 (permalink)  
Old 03-18-10, 13:07
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,574
What is the one that is in lock wait trying to execute? You can also look at the Dynamic SQL monitor.

Andy
Reply With Quote
  #9 (permalink)  
Old 03-18-10, 13:32
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,810
I've never used this tool. ID 39 is in lock-wait. Is it waiting for ID 8? The last operation of ID 8 is close which is not the same as commit so it may still be holding locks.
Reply With Quote
  #10 (permalink)  
Old 03-18-10, 13:38
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,574
Yes, the locks are still held. The first screenshot shows that. I am trying to get the OP to see what statements are being issued. Obviously the application is not using commit to free up the locks.

Andy
Reply With Quote
  #11 (permalink)  
Old 03-18-10, 15:33
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
Bella, it is a nice tool to get a quick look at your db. plus, it is free
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
Reply With Quote
  #12 (permalink)  
Old 03-18-10, 15:45
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,810
I prefer not to use any tools...

I like the website -> chuzhoi
Reply With Quote
  #13 (permalink)  
Old 03-19-10, 08:24
ricardovp ricardovp is offline
Registered User
 
Join Date: Mar 2010
Location: São Paulo, Brazil
Posts: 7
Hi Andy!

I’ve managed to solve this issue! The problem was that my backup file had some problems, and the SYSIBM tables were being created with some mistakes (I don’t know exactly what mistakes, I’m still a beginner in DB2 ). I’ve solve it by creating a new database, and importing my the tables from the old one.

Thanks for your help!!

Ricardo
Reply With Quote
  #14 (permalink)  
Old 03-19-10, 08:31
ricardovp ricardovp is offline
Registered User
 
Join Date: Mar 2010
Location: São Paulo, Brazil
Posts: 7
Hi Bella!

The problem is that the ID-8 was just executing SELECT statements, there was nothing to commit… As I said, the problem was not the application, because when I do the downgrade to the version 6 of the DB2 (and used another backup file to create the database) it works just fine… the problem was the creation of the database with a backup file that has problems…

Thanks for your help!

Ricardo
Reply With Quote
  #15 (permalink)  
Old 03-19-10, 08:37
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,574
Where did the backup image come from? V6 or V8? If it was from V6, then the problem is probably that DB2 usually only supports restoring a backup from only 1 prior version level. So restoring a V6 backup to V8 is not supported.

Andy
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