在操作ORACLE数据库的时候,由于执行完,没有COMMIT,多次修改,后来导致那张表被锁住,当编辑时就会出现这个信息,record is locked by another user!
当出现这种情况的时候,只要操作下面几个步骤就可以解锁了。
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
order by t2.logon_time;
2.解锁(KILL)
执行命令alter system kill session ‘sid,serial#’
alter system kill session ‘2001,25423’;