当使用'for update' 造成表锁住了.可以用DBA登陆按照下面步骤:

1.查看哪个表被锁:

select b.owner,b.object_name,l.session_id,l.locked_mode
from v$locked_object l, dba_objects b
where b.object_id=l.object_id;

2.查看被锁表的sid 和serial# :

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;

3.执行下面的语句:

alter system kill session 'sid,serial#';

相关文章:

  • 2021-07-17
  • 2021-11-27
  • 2022-12-23
  • 2021-08-04
  • 2021-07-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-03-06
  • 2021-08-07
  • 2021-06-04
  • 2022-01-18
  • 2021-06-26
相关资源
相似解决方案