select
(select username from v$session where sid=a.sid) blocker,
a.sid, 'is blocking',
(select username from v$session where sid=b.sid) blockee,
b.sid
from v$lock a,v$lock b
where a.block=1 and b.request>0
and a.id1=b.id1
and a.id2=b.id2
查询哪些session阻塞了哪些其他进程.
alter system kill session 'sid,serial#';
杀掉session
51Testing软件测试网&c
如何查看系统存在的死锁会话
最新推荐文章于 2021-04-04 11:10:43 发布
本文提供了一种查询Oracle中发生阻塞的会话的方法,并展示了如何通过SQL语句找到阻塞其他进程的session。此外,还介绍了如何使用'altersystemkillsession'命令来终止特定的session。
1150

被折叠的 条评论
为什么被折叠?



