DB2 and Specifying Read Only with Uncommited Reads

Posts   
 
    
pmax100
User
Posts: 10
Joined: 03-Nov-2009
# Posted on: 03-Nov-2009 18:39:08   

Hi,

Does anyone know if it's possible to use LLBLGEN with DB2 to retreive records with the 'for read only with ur' clause and isolation level specified?

I'm looking to avoid locking up data tables whilst querying records and have been advised that all read only queries should have this clause appended.

According to the DB2 documentation:

"The uncommitted read isolation level allows an application to access the uncommitted changes of other transactions. Moreover, UR does not prevent another application from accessing a row that is being read, unless that application is attempting to alter or drop the table."

Is this something that LLBLGEN can do via a driver or adaptor setting for Select queries?

Many thanks for any thoughts!

pmax100

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 03-Nov-2009 20:58:17   

Yes - you need to manually start a transaction specifying the ReadUncommited isolation level.

Have a search of the forums for "isolation level" as the thread subject - this has been discussed a few times in the past.

Matt

pmax100
User
Posts: 10
Joined: 03-Nov-2009
# Posted on: 04-Nov-2009 10:16:31   

Hi Matt,

Many thanks for your reply.

I was aware that you can use transactions in different modes but hadn't realised that you had run select queies within a transaction in order to specify read only/ur with LLBLGEN.

I'll take another look at the documentation!

pmax100