首页 >数据库 >mysql教程 >查看哪些对象被lock

查看哪些对象被lock

WBOY
WBOY原创
2016-06-07 14:55:111409浏览

Oracle 数据库无 SELECT /* 规则 */ 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 来自 v$session s、v$

Oracle数据库
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
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn