Updating a row in db2

Posted by / 29-May-2020 00:53

HI, Im using DB2 v9 and i wish to lock only some rows ( not the hole table ) from a table ,i've tried to use this : " Select ... For the ones who are familiar with oracle , im searching for the DB2 command that has the same effect as the oracle command " Select for update". Hi finaris, You may want to see if your application is consuming too much of the lock list. with rs ", but this statement locks the whole table !Sorry if the questions are basic - am not familiar with the db2 ... So this is because db2 does not support "read consistency" as supported by Oracle, correct?Sorry if the questions are basic - am not familiar with the db2 ...Releases locks when finished accessing a particular row (when DB2 read the next row)..UR - Uncommitted Read - No locks held (dirty read).in cases such as weather forecast etc where results need not be exact - this is just a random example but hopefully you get the idea:)) Many thanx, Interesting... So when you say "There is no lock contention for SQL statements in the same unit of work (same application program)." - you mean that in the same "session" there is no lock contention.

The size of the locklist for a database can be changed by the DBA.

No other SQL statement can update a row while a share lock is being held, but other share locks can coexist.

There is no lock contention for SQL statements in the same unit of work (same application program). So when you say "There is no lock contention for SQL statements in the same unit of work (same application program)." - you mean that in the same "session" there is no lock contention.

The isolation level determines how long read locks are held.

DB2 has the following Isolation levels: RR - Repeatable Read - Holds the share lock on all rows accessed. RS- Read Stability - Hold share lock on all rows accessed. CS - Cursor Stability - Holds share lock on all rows accessed.

updating a row in db2-49updating a row in db2-89updating a row in db2-61

Hi folks First time posting -if this is not the correct forum, please let me know.