如何查看当前ORACLE数据库里面锁的情况
1个回答
展开全部
用如下语句查询锁死的表:
1
2
3
4
5
6
7
8
9
10
select p.spid,
a.serial#,
c.object_name,
b.session_id,
b.oracle_username,
b.os_user_name
from v$process p, v$session a, v$locked_object b, all_objects c
where p.addr = a.paddr
and a.process = b.process
and c.object_id = b.object_id;
其中object_name就是被锁的表名,如图:
1
2
3
4
5
6
7
8
9
10
select p.spid,
a.serial#,
c.object_name,
b.session_id,
b.oracle_username,
b.os_user_name
from v$process p, v$session a, v$locked_object b, all_objects c
where p.addr = a.paddr
and a.process = b.process
and c.object_id = b.object_id;
其中object_name就是被锁的表名,如图:
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询