oracle手动锁表

手工锁表:
lock table tbl_t1 in row share mode nowait;                --2
lock table tbl_t1 in share update mode nowait;             --2
lock table tbl_t1 in row exclusive mode nowait;            --3
lock table tbl_t1 in share mode nowait;                    --4
lock table tbl_t1 in share row exclusive mode nowait;      --5
lock table tbl_t1 in exclusive mode nowait;                --6
 
 
0:none
1:null      空                 
2:Row-S     行共享(RS):共享表锁   
3:Row-X     行专用(RX):用于行的修改
4:Share     共享锁(S):阻止其他DML操作
5:S/Row-X   共享行专用(SRX):阻止其他事务操作
6:exclusive 专用(X):独立访问使用
 
手工解锁:
rollback/commit

猜你喜欢

转载自cn-legend.iteye.com/blog/2263384