Repository navigation
11. Latch and Lock
Sayan Bhattacharya edited this page May 9, 2026
·
6 revisions
Q . A scenario where 2 user Rohit and Robin are try to update a same dml record then what will happen,
suppose 2 users are conn by two terminals. rohit have a table TAB . this table access to Robin user . and they try to update a same record.
In architechture, datablocks are there , when a record updated in datablock, current datablock transfer to the undo datablock. and the address of the undo datablock will store in this datablock.
so that a user comes with a quary we can get the priv values from undo datafile. call read consistancy.
In these scenario a user transaction done to update a record but he hasn't completed the transaction . so whenever a transaction done to there will be a lock applied on the particular row. in that case A transaction will retain its lock until it completes its work (Commit/Rollback). When you do commit then lock will released.
i> As a DBA i can kill this rohit user session activity , before kill the session i get a mail from my senior or management . i'm killing this activity its something happend i'm not responsible for this .