从阻止会话的Oracle查找查询 [英] Finding query from oracle which is blocking session

查看:79
本文介绍了从阻止会话的Oracle查找查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想找出查询,该查询的任何操作均被阻止. 从DBA,我得到特定会话被阻止的输入,但是在不知道哪个查询引起问题的情况下,我无法进一步进行调查. 有什么办法找出引起问题的确切查询?

I want to find out the query for which any operation is blocked. From DBA I'm getting input that particular session is blocked but I cannot proceed with investigation further without knowing which query is causing issue. is there any way to find out exact query causing issue?

推荐答案

Oracle Blocking会话 非常常见.请检查以下查询,它将帮助您获取详细信息.

Oracle Blocking session is very common. Please check the below query it will help you to get the detailed information.

select l1.inst_id,l1.sid, ' IS BLOCKING ', l2.sid,l1.type,l2.type,l1.lmode,l2.lmode,l2.inst_id
from gv$lock l1, gv$lock l2
where l1.block =1 and l2.request > 0and l1.id1=l2.id1
and l1.id2=l2.id2;

这篇关于从阻止会话的Oracle查找查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆