Oracle数据表锁死的解决办法


死锁时会报错:ORA-00060: deadlock detected while waiting for resource

对应的中文报错是:ORA-00060: 等待资源时检测到死锁

执行下面的SQL,查看被锁的表:

select object_name, machine, s.sid, s.serial#
  from v$locked_object l, dba_objects o, v$session s
 where l.object_id = o.object_id
   and l.session_id = s.sid
执行下面的SQL可以强制解锁:
alter system kill session '277,1817'
--其中277对应上句SQL查出来的sid字段, 1817对应serial字段具体的值





posted @ 2021-10-14 17:00  喵酱张-Eric  阅读(290)  评论(0编辑  收藏  举报