ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 查找数据库锁

查找数据库锁

原创 Linux操作系统 作者:asiaidea 时间:2010-11-04 18:27:34 0 删除 编辑

select /*+ rule */
s.username,
decode(l.type, 'TM', 'TABLE LOCK', 'TX', 'ROW LOCK', null) lock_level,
o.owner,
o.object_name,
o.object_type,
s.sid,
s.serial#,
s.terminal,
s.machine,
s.program,
s.osuser
from v$session s, v$lock l, dba_objects o
where l.sid = s.sid
and l.id1 = o.object_id(+)
and s.username is not null
and object_name is not null
and decode(l.type, 'TM', 'TABLE LOCK', 'TX', /*'ROW LOCK',*/ null) is not null;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10359218/viewspace-677407/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-11-04

  • 博文量
    140
  • 访问量
    519105