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 > db2 Performance Prolems

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-24-06, 15:49
Pravas Pravas is offline
Registered User
 
Join Date: Jun 2005
Posts: 16
db2 Performance Prolems

Hi ALL,

I have 2 questions


1) When we bind the application to the database we specify an isolation level of UR (see statement below.)

db2 bind $i qualifier awqm dynamicrules bind sqlerror continue validate run isolation UR blocking ALL

My understanding is that means that ALL static SQL statements in the code will be executed using the WITH UR clause even if not specified in the actual select statement. Is there any case where this is not true ?

And also does this apply to both cursors and Select into statements in the code ?

2) Is there a way to monitor locks on a table and tell which SQL statement is causing the lock ?

Thanks in Advance.
Your Help is appreciated.
Reply With Quote
  #2 (permalink)  
Old 03-24-06, 23:22
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
1. Yes, that should be true. However this only applies to select statements, and not for select for update, insert, update, or delete.

2. You can do a snapshot for locks. See the Command Reference manaul for get snaphsot. You must first turn on the appropriate monitor switches (for locks, statements, and timestamp) in the DB2 instance configuration (db2 get dbm cfg).
__________________
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 03-29-06, 13:24
dahalkar_p dahalkar_p is offline
Registered User
 
Join Date: Oct 2001
Location: Bangalore
Posts: 186
Just a continuation to this topic:

DB2 V8.1 has RR as it's default isolation level. This will hold good for all the objects (User and system catalog + the packages). In a scenario where i have to fire same procedure from multiple threads the RR isolation creates locks even for the data being read or referenced. RR also leads to lock escalation if LOCKLIST is not sufficient. So i wanted to move to CS or RS.

Can someone please tell me how i can force some database to use the CS or RS isolation level?

The DB2_RR_TO_RS=YES works only for user tables and not the system tables. I have seen commands like "change isolation level" and "set isolation level" but they work only for session level.

cheers
__________________
Prashant
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