This is just my personal opinion : Just think the oracle lock is a physical lock on the row level or table level.
there are 2 modes for locking:when placing a lock , i think it just like an anouncement " Hey , every session in database , I am place a lock on that record /table " , if a exclusive lock placed ,
another exclusive lock can not be placed on the same record / table . for more details of the combination of the lock compatibility , there is a table in oracle doc . (following oracle doc)exclusive lock mode
Prevents the associates resource from being shared. This lock mode is obtained to modify data. The first transaction to lock a resource exclusively is the only transaction that can alter the resource until the exclusive lock is released.
share lock mode
Allows the associated resource to be shared, depending on the operations involved. Multiple users reading data can share the data, holding share locks to prevent concurrent access by a writer (who needs an exclusive lock). Several transactions can acquire share locks on the same resource.
光说不练之龙飞虎
there are 2 modes for locking:when placing a lock , i think it just like an anouncement " Hey , every session in database , I am place a lock on that record /table " , if a exclusive lock placed ,
another exclusive lock can not be placed on the same record / table . for more details of the combination of the lock compatibility , there is a table in oracle doc . (following oracle doc)exclusive lock mode
Prevents the associates resource from being shared. This lock mode is obtained to modify data. The first transaction to lock a resource exclusively is the only transaction that can alter the resource until the exclusive lock is released.
share lock mode
Allows the associated resource to be shared, depending on the operations involved. Multiple users reading data can share the data, holding share locks to prevent concurrent access by a writer (who needs an exclusive lock). Several transactions can acquire share locks on the same resource.
光说不练之龙飞虎
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货