ORACLE数据库表解锁record is locked by another user
今天同事在操作Oracle数据库表删数据时突然断网,再次连接的时候删数据就提示“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 '151,14678'; --151是sid,14678是serial#
运行以上命令后,就可以解决此问题。
操作记录:
1、数据库表被锁;
2、查锁
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;
1 BCSA 64 40449 2016/10/9 15:38:05 2 BCSA 64 40449 2016/10/9 15:38:05 3 BCSA 64 40449 2016/10/9 15:38:05 4 BCSA 64 40449 2016/10/9 15:38:05
3、解锁
alter system kill session '64,40449';
posted on 2016-10-09 16:43 xusweeter 阅读(19904) 评论(1) 编辑 收藏 举报