0

select .. WITH UR ignores locks and gives only currently committed data

how to read data that are not committed ?

as in Oracle :

update table set ..

select .. gives modified and yet uncommitted data

Ben
  • 188
  • 2
  • 16
  • In `...WITH UR` the "UR" part stands for "uncommitted read", so the query will in fact return uncommitted data. – mustaccio Sep 29 '13 at 21:00
  • with UR simply ignores locks and returns data as they are but before committing changes and without taking updates into account. Others DBSMs as Oracle , Sybase return changed but uncommited data in dirty select. I think this is the way db2 works and there's no solution to evaluate the impact of updates before commit. UPDATE .. SELECT .. ROLLBACK is useless in db2 ! – Ben Sep 30 '13 at 06:56
  • I don't know how you tested that, but you're wrong. ![Here's a screenshot](http://farm8.staticflickr.com/7408/10019763665_c57bc57ae5_b.jpg) – mustaccio Sep 30 '13 at 14:01

1 Answers1

1

Data that is not commited cannot be read by other transaction, the only way to retrieve that data is in the transaction that is modifying the data.

For more information about isolation and concurrency in DB2, please take a look at this tutorial: http://www.ibm.com/developerworks/data/tutorials/db2-cert6106/

AngocA
  • 7,655
  • 6
  • 39
  • 55