关于 oracle record is locked by another user 问题解决办法

在操作ORACLE数据库的时候,由于执行完,没有COMMIT,直接把PL/SQL关闭掉,后来导致那张表被锁住,当编辑时就会出现这个信息

record is locked by another user!

当出现这种情况的时候,只要操作下面几个步骤就可以解锁:


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;
--查看锁

--alter system kill session 'sid,serial#';
--把锁给KILL掉
alter system kill session '151,14678';

你可能感兴趣的:(关于 oracle record is locked by another user 问题解决办法)