Record is locked by another user

Record is locked by another user –Oracle行锁解锁在操作表时没有commit,导致表被锁,只要执行下面两行语句,就可以了将行锁解锁了。

  1.      Select t2.username,t2.sid,t2.serial#,t2.logon_time from v$locked_object t1,v$session t2 where t1.session_id=t2.sid; 
    
    – 查看被锁表的sid 和 serial#
  2. alter system kill session 'sid, serial#';
    – kill 锁 ,例如输入 alter system kill session '140, 25';
    执行完以上两步后,就可以编辑数据了。

你可能感兴趣的:(Record is locked by another user)