sql - Oracle Database Documentation Lock Modes Example -
oracle database documentation provides example of 2 transactions concurently obtaining explicit locking. believe there mistake, bottom(right) transaction should able obtain srx lock if 1st (left) transaction got rs lock.
what opinion? want make sure indeed error.
just done test, opinion right. result below:
session 1:
sql> lock table cenzhgl.lock_test in row share mode; table(s) locked
session 2:
sql> lock table cenzhgl.lock_test in exclusive mode nowait; ora-00054 sql> lock table cenzhgl.lock_test in share row exclusive mode nowait; table(s) locked
oracle lock model mutex relationship below:
lock mode | lock name | permit | exclusion --------------|-------------------------------|----------|-------------- 2 | row share | 2,3,4,5 | 6 3 |row exclusive table lock | 2,3 | 4,5,6 4 | share table lock | 2,4 | 2,5,6 5 |share row exclusive table lock | 2 | 3,4,5,6 6 | exclusive table lock | | 2,3,4,5,6
Comments
Post a Comment